Changeset 9e429e8 for lib/trace.c


Ignore:
Timestamp:
09/19/14 15:40:01 (7 years ago)
Author:
Richard Sanger <rsangerarj@…>
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:
11cf9b1
Parents:
d994324 (diff), ea602cd (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge remote-tracking branch 'upsteam/master' into develop

Conflicts:

README
lib/format_dpdk.c
lib/format_linux.c
lib/trace.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace.c

    rd994324 r9e429e8  
    825825                do {
    826826                        size_t ret;
     827                        int filtret;
    827828                        /* Finalise the packet, freeing any resources the format module
    828829                         * may have allocated it and zeroing all data associated with it.
     
    840841                                 * packet
    841842                                 */
    842                                 if (!trace_apply_filter(libtrace->filter,packet)){
     843                                filtret = trace_apply_filter(libtrace->filter, packet);
     844                                if (filtret == -1) {
     845                                        /* Error compiling filter, probably */
     846                                        return ~0U;
     847                                }
     848                               
     849                                if (filtret == 0) {
    843850                                        ++libtrace->filtered_packets;
    844851                                        continue;
     
    12201227
    12211228        if (packet->trace->format->trace_event) {
     1229                /* Note: incrementing accepted, filtered etc. packet
     1230                 * counters is handled by the format-specific
     1231                 * function so don't increment them here.
     1232                 */
    12221233                event=packet->trace->format->trace_event(trace,packet);
    1223                 if (event.type == TRACE_EVENT_PACKET) {
    1224                         ++trace->accepted_packets;
    1225                 }
    1226         }
     1234                }
    12271235        return event;
    12281236
     
    19481956                return trace->format->get_filtered_packets(trace)+
    19491957                        trace->filtered_packets;
    1950         }
    1951         if (trace->format->get_received_packets
    1952                 && trace->format->get_dropped_packets) {
    1953                 return
    1954                         ((trace_get_received_packets(trace)
    1955                         -trace_get_accepted_packets(trace))
    1956                         -trace_get_dropped_packets(trace))
    1957                         +trace->filtered_packets;
    19581958        }
    19591959        return trace->filtered_packets;
Note: See TracChangeset for help on using the changeset viewer.