Changeset a7d1914 for lib/format_erf.c


Ignore:
Timestamp:
09/27/06 15:53:27 (15 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:
742a332
Parents:
41b7eab
Message:

Remove packet->size as noone really knew what it held anyway, and disagreements
were more easily settled by removing it than standardising one way or the other.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_erf.c

    r5945854 ra7d1914  
    547547
    548548        packet->type = RT_DUCK_2_4;
    549         packet->size = sizeof(duck_inf);
    550549        if (!DUCK.dummy_duck)
    551550                DUCK.dummy_duck = trace_create_dead("duck:dummy");
    552551        packet->trace = DUCK.dummy_duck;
    553         return packet->size;
     552        return sizeof(duck_inf);
    554553}       
    555554#else
     
    581580
    582581        packet->type = RT_DUCK_2_5;
    583         packet->size = sizeof(duckinf_t);
    584582        if (!DUCK.dummy_duck)
    585583                DUCK.dummy_duck = trace_create_dead("rt:localhost:3434");
    586584        packet->trace = DUCK.dummy_duck;       
    587         return packet->size;
     585        return sizeof(duck_inf);
    588586}       
    589587#endif
     
    662660        DAG.diff -= size;
    663661
    664         if (packet->payload != NULL)
    665                 packet->size = trace_get_capture_length(packet) +
    666                         erf_get_framing_length(packet);
    667         else
    668                 packet->size = erf_get_framing_length(packet);
    669        
    670662        tv = trace_get_timeval(packet);
    671663        DUCK.last_pkt = tv.tv_sec;
    672664       
    673         return (packet->size);
     665        return packet->payload ? size : erf_get_framing_length(packet);
    674666}
    675667
Note: See TracChangeset for help on using the changeset viewer.