- Timestamp:
- 08/25/15 17:43:01 (6 years ago)
- 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:
- 9a3a846
- Parents:
- f2066fa
- Location:
- lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/libtrace_int.h
rf2066fa r2fa43fa 307 307 /** The sequence is like accepted_packets but we don't reset this after a pause. */ 308 308 uint64_t sequence_number; 309 /** The packet read out by the trace, backwards compatibility to allow us to finalise 310 * a packet when the trace is destroyed */ 311 libtrace_packet_t *last_packet; 309 312 /** The filename from the uri for the trace */ 310 313 char *uridata; -
lib/trace.c
r4007dbb r2fa43fa 261 261 libtrace->filtered_packets = 0; 262 262 libtrace->accepted_packets = 0; 263 libtrace->last_packet = NULL; 263 264 264 265 /* Parallel inits */ … … 383 384 libtrace->io = NULL; 384 385 libtrace->filtered_packets = 0; 386 libtrace->accepted_packets = 0; 387 libtrace->last_packet = NULL; 385 388 386 389 /* Parallel inits */ … … 549 552 return -1; 550 553 } 554 555 /* Finish the last packet we read - for backwards compatibility */ 556 if (libtrace->last_packet) 557 trace_fin_packet(libtrace->last_packet); 558 assert(libtrace->last_packet == NULL); 559 551 560 if (libtrace->format->pause_input) 552 561 libtrace->format->pause_input(libtrace); 562 553 563 libtrace->started=false; 554 564 return 0; … … 689 699 } 690 700 701 /* Finish any the last packet we read - for backwards compatibility */ 702 if (libtrace->last_packet) 703 trace_fin_packet(libtrace->last_packet); 704 assert(libtrace->last_packet == NULL); 705 691 706 if (libtrace->format) { 692 707 if (libtrace->started && libtrace->format->pause_input) … … 827 842 packet->trace->format->fin_packet(packet); 828 843 } 844 if (packet->trace && packet->trace->last_packet == packet) 845 packet->trace->last_packet = NULL; 829 846 830 847 // No matter what we remove the header and link pointers … … 905 922 ++libtrace->accepted_packets; 906 923 ++libtrace->sequence_number; 924 libtrace->last_packet = packet; 907 925 return ret; 908 926 } while(1);
Note: See TracChangeset
for help on using the changeset viewer.