Ignore:
Timestamp:
08/07/14 11:21:10 (6 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:
4649fea
Parents:
cd8efa6
Message:

Fix strangeness when using bogus filters on int:

Changes:

  • Make sure trace_start returns -1 for int: if the provided filter failed to compile, rather than falling through to using trace_apply_filter on the first packet (and failing). This is also more consistent with what pcapint: already does.
  • Check for -1 return value from trace_apply_filter, rather than treating -1 as a successful match.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_helper.c

    r74ecbc7 rb8d8186  
    111111
    112112        if (FD_ISSET(event.fd, &rfds_param)) {
    113                 event.size = trace_read_packet(trace,packet);
    114                
     113                event.size = trace_read_packet(trace,packet);
    115114                if (event.size < 1) {
    116115                        /* Covers error and EOF events - terminate rather
Note: See TracChangeset for help on using the changeset viewer.