Changeset c1db742 for lib/format_erf.c


Ignore:
Timestamp:
02/22/06 16:44:31 (16 years ago)
Author:
Perry Lorier <perry@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
f0d19d4
Parents:
fe76c55
Message:

rename PACKET/EXTERNAL to TRACE_CTRL_ to avoid symbol clashes on windows.
fix some c++ style comments that have snuck in somewhere along the lines

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_erf.c

    rfe76c55 rc1db742  
    353353        int rlen;
    354354
    355         if (packet->buf_control == PACKET) {
    356                 packet->buf_control = EXTERNAL;
     355        if (packet->buf_control == TRACE_CTRL_PACKET) {
     356                packet->buf_control = TRACE_CTRL_EXTERNAL;
    357357                free(packet->buffer);
    358358                packet->buffer = 0;
     
    395395        int rlen;
    396396
    397         if (!packet->buffer) {
     397        if (!packet->buffer || packet->buf_control == TRACE_CTRL_EXTERNAL) {
    398398                packet->buffer = malloc(LIBTRACE_PACKET_BUFSIZE);
    399                 packet->buf_control = PACKET;
     399                packet->buf_control = TRACE_CTRL_PACKET;
    400400        }
    401401
     
    441441        int numbytes;
    442442
    443         if (buffer == 0)
    444                 buffer = malloc(len);
    445443        while(1) {
    446444#ifndef MSG_NOSIGNAL
     
    479477        packet->trace = libtrace;
    480478
    481         if (packet->buf_control == EXTERNAL) {
    482                 packet->buf_control = PACKET;
     479        if (packet->buf_control == TRACE_CTRL_EXTERNAL || !packet->buffer) {
     480                packet->buf_control = TRACE_CTRL_PACKET;
    483481                packet->buffer = malloc(LIBTRACE_PACKET_BUFSIZE);
    484482        }
Note: See TracChangeset for help on using the changeset viewer.