Changeset 1346

Show
Ignore:
Timestamp:
08/04/08 15:34:42 (9 months ago)
Author:
perry
Message:

Make sure that the length cache is cleared when we end up consuming multiple
packets in read_packet()

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/trace.c

    r1332 r1346  
    729729        } 
    730730 
    731         /* Clear the packet cache */ 
    732         packet->capture_length = -1; 
    733         packet->l3_header = NULL; 
    734         packet->l3_ethertype = 0; 
    735731 
    736732        if (libtrace->format->read_packet) { 
    737733                do { 
    738734                        size_t ret; 
     735                        /* Clear the packet cache */ 
     736                        packet->capture_length = -1; 
     737                        packet->l3_header = NULL; 
     738                        packet->l3_ethertype = 0; 
     739 
    739740                        ret=libtrace->format->read_packet(libtrace,packet); 
    740741                        if (ret==(size_t)-1 || ret==0) {