diff options
author | Sake Blok <sake@euronet.nl> | 2008-09-30 15:45:20 +0000 |
---|---|---|
committer | Sake Blok <sake@euronet.nl> | 2008-09-30 15:45:20 +0000 |
commit | 2ce22e6bca4a7e90ca201016ed8d408373ac2a60 (patch) | |
tree | c05822615d1ccfc02e84affb8965374ea33198d6 /file.c | |
parent | aa30dcd1293b7eb218140724a377092afa35ffb3 (diff) |
From jmmikkel@mit.edu (Bug 2895):
We might receive new packets while redissecting and don't want to
dissect those before the packet-list is fully rebuilt.
svn path=/trunk/; revision=26309
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1122,7 +1122,9 @@ read_packet(capture_file *cf, dfilter_t *dfcode, gint64 offset) cf->count++; cf->f_datalen = offset + phdr->caplen; fdata->num = cf->count; - row = add_packet_to_packet_list(fdata, cf, dfcode, pseudo_header, buf, TRUE); + if (!cf->redissecting) { + row = add_packet_to_packet_list(fdata, cf, dfcode, pseudo_header, buf, TRUE); + } } else { /* XXX - if we didn't have read filters, or if we could avoid allocating the "frame_data" structure until we knew whether @@ -1515,6 +1517,10 @@ rescan_packets(capture_file *cf, const char *action, const char *action_item, which might cause the state information to be constructed differently by that dissector. */ + /* We might receive new packets while redissecting, and we don't + want to dissect those before their time. */ + cf->redissecting = TRUE; + /* Initialize all data structures used for dissection. */ init_dissection(); } @@ -1661,6 +1667,9 @@ rescan_packets(capture_file *cf, const char *action, const char *action_item, prev_frame = fdata; } + /* We are done redissecting the packet list. */ + cf->redissecting = FALSE; + /* Re-sort the list using the previously selected order */ packet_list_set_sort_column(); |