aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2012-05-22 01:59:34 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2012-05-22 01:59:34 +0000
commit775574779792219dd62e5a677755589737bc7984 (patch)
treefba214699a470526e21be3a4f41d6656a1c73167 /file.c
parenta65518fe55b82c4f3199031a8d1cb8277a39fb60 (diff)
Finish fixing https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7270#c4 :
Revert r42758 as it only helps in one case; rather, fix it correctly: if we're redissecting or refiltering, clear any frame dependencies as we go along. (Fortunately, frame dependencies are all forward dependencies-- meaning that a given frame can only be depended upon by a later frame-- so we can do this as we rescan the packets/frames.) svn path=/trunk/; revision=42762
Diffstat (limited to 'file.c')
-rw-r--r--file.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/file.c b/file.c
index 79d4585cbe..54dbc5f168 100644
--- a/file.c
+++ b/file.c
@@ -270,7 +270,7 @@ static void compute_elapsed(GTimeVal *start_time)
delta_time = (time_now.tv_sec - start_time->tv_sec) * 1e6 +
time_now.tv_usec - start_time->tv_usec;
- computed_elapsed = (gulong) (delta_time / 1000); /* ms*/
+ computed_elapsed = (gulong) (delta_time / 1000); /* ms */
}
cf_status_t
@@ -1135,13 +1135,9 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
g_slist_foreach(edt.pi.dependent_frames, find_and_mark_frame_depended_upon, cf);
}
}
- } else {
+ } else
fdata->flags.passed_dfilter = 1;
- /* If there's no dfilter then there are no frame dependencies */
- fdata->flags.dependent_of_displayed = 0;
- }
-
if(fdata->flags.passed_dfilter || fdata->flags.ref_time)
cf->displayed_count++;
@@ -1817,6 +1813,13 @@ rescan_packets(capture_file *cf, const char *action, const char *action_item,
frame_data_cleanup(fdata);
}
+ if (redissect || refilter) {
+ /* If we're redissecting or refiltering then any frame dependencies
+ * from the previous dissection/filtering are no longer valid.
+ */
+ fdata->flags.dependent_of_displayed = 0;
+ }
+
if (!cf_read_frame(cf, fdata))
break; /* error reading the frame */
@@ -2851,7 +2854,7 @@ match_protocol_tree(capture_file *cf, frame_data *fdata, void *criterion)
static void
match_subtree_text(proto_node *node, gpointer data)
{
- match_data *mdata = (match_data*) data;
+ match_data *mdata = (match_data *) data;
const gchar *string = mdata->string;
size_t string_len = mdata->string_len;
capture_file *cf = mdata->cf;
@@ -3655,10 +3658,10 @@ cf_unignore_frame(capture_file *cf, frame_data *frame)
}
/*
- * Read the comment in SHB block
+ * Read the comment in SHB block
*/
-const gchar*
+const gchar *
cf_read_shb_comment(capture_file *cf)
{
wtapng_section_t *shb_inf;