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
This commit is contained in:
Jeff Morriss 2012-05-22 01:59:34 +00:00
parent a65518fe55
commit 7755747797
1 changed files with 12 additions and 9 deletions

21
file.c
View File

@ -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;