Changeset 6033b99


Ignore:
Timestamp:
03/11/08 11:52:17 (13 years ago)
Author:
Shane Alcock <salcock@…>
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:
121b7e2
Parents:
2b7750a
Message:
  • Fixed bug where DAG 2.5 was never seeing any packets when using the event framework, because the internal pointers were never being updated!
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_dag25.c

    r2b7750a r6033b99  
    341341        libtrace_eventobj_t event = {0,0,0.0,0};
    342342        dag_record_t *erfptr = NULL;
    343        
    344         erfptr = dag_get_record(trace);
     343        int numbytes;
     344       
     345        /* Need to call dag_available so that the top pointer will get
     346         * updated, otherwise we'll never see any data! */
     347        numbytes = dag_available(trace);
     348
     349        /* May as well not bother calling dag_get_record if dag_available
     350         * suggests that there's no data */
     351        if (numbytes != 0)
     352                erfptr = dag_get_record(trace);
    345353        if (erfptr == NULL) {
    346354                /* No packet available */
Note: See TracChangeset for help on using the changeset viewer.