Ignore:
Timestamp:
08/25/14 11:33:39 (7 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, 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:
7fda5c5
Parents:
a79eae41
Message:

Don't increment accepted_packets in trace_event

For formats that use the normal trace_event_device and
trace_event_trace functions to implement trace_event functionality,
this was resulting in accepted_packets being incremented twice:
once in the call to trace_read_packet within the standard event
function and once again in trace_event.

Removed the increment from trace_event and updated all formats
that provide a custom trace_event implementation to make sure they
either call trace_read_packet themselves or update the counters
properly (with the former preferred wherever possible).

Thanks to Alistair King for finding this bug.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_pcapfile.c

    rf7bcbfb rc70f59f  
    713713
    714714        if (IN_OPTIONS.real_time) {
    715                 event.size = pcapfile_read_packet(libtrace, packet);
     715                event.size = trace_read_packet(libtrace, packet);
    716716                if (event.size < 1)
    717717                        event.type = TRACE_EVENT_TERMINATE;
Note: See TracChangeset for help on using the changeset viewer.