Make frame_data_set_after_dissect() callers do the necessary checks instead

svn path=/trunk/; revision=30068
This commit is contained in:
Kovarththanan Rajaratnam 2009-09-22 14:50:43 +00:00
parent 627a7c1f47
commit 1e8d9b4937
3 changed files with 15 additions and 22 deletions

View File

@ -275,25 +275,22 @@ frame_data_set_after_dissect(frame_data *fdata,
guint32 *cum_bytes,
nstime_t *prev_dis_ts)
{
if(fdata->flags.passed_dfilter || fdata->flags.ref_time)
{
/* This frame either passed the display filter list or is marked as
a time reference frame. All time reference frames are displayed
even if they dont pass the display filter */
if(fdata->flags.ref_time){
/* if this was a TIME REF frame we should reset the cul bytes field */
*cum_bytes = fdata->pkt_len;
fdata->cum_bytes = *cum_bytes;
} else {
/* increase cum_bytes with this packets length */
*cum_bytes += fdata->pkt_len;
fdata->cum_bytes = *cum_bytes;
}
/* Set the time of the previous displayed frame to the time of this
frame. */
*prev_dis_ts = fdata->abs_ts;
/* This frame either passed the display filter list or is marked as
a time reference frame. All time reference frames are displayed
even if they dont pass the display filter */
if(fdata->flags.ref_time){
/* if this was a TIME REF frame we should reset the cul bytes field */
*cum_bytes = fdata->pkt_len;
fdata->cum_bytes = *cum_bytes;
} else {
/* increase cum_bytes with this packets length */
*cum_bytes += fdata->pkt_len;
fdata->cum_bytes = *cum_bytes;
}
/* Set the time of the previous displayed frame to the time of this
frame. */
*prev_dis_ts = fdata->abs_ts;
}
void

View File

@ -1053,8 +1053,6 @@ process_packet(capture_file *cf, gint64 offset, const struct wtap_pkthdr *whdr,
tap_push_tapped_queue(&edt);
/* We don't use a display filter */
fdata.flags.passed_dfilter = 1;
frame_data_set_after_dissect(&fdata, &cum_bytes, &prev_dis_ts);
for(i = 0; i < n_rfilters; i++) {

View File

@ -2410,8 +2410,6 @@ process_packet(capture_file *cf, gint64 offset, const struct wtap_pkthdr *whdr,
passed = TRUE;
}
fdata.flags.passed_dfilter = passed;
if (passed) {
frame_data_set_after_dissect(&fdata, &cum_bytes, &prev_dis_ts);