diff options
author | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-08-14 05:22:12 +0000 |
---|---|---|
committer | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-08-14 05:22:12 +0000 |
commit | 68e75a961b14380581a60c20346324d95be1d9e3 (patch) | |
tree | 933cea9e203a8a9f63d75c7ef7513f1ca0c444ae /file.c | |
parent | df97e60d274d862431606a5b7be74f88ef4a00fd (diff) |
Always add packet to the new packet list regardless of whether the packet passed the display filter test or not. We do this because we do the filtering inside the new packet list.
svn path=/trunk/; revision=29408
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 25 |
1 files changed, 13 insertions, 12 deletions
@@ -1000,10 +1000,10 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf, union wtap_pseudo_header *pseudo_header, const guchar *buf, gboolean refilter) { - gint row; gboolean create_proto_tree = FALSE; epan_dissect_t edt; column_info *cinfo; + gint row = -1; #ifdef NEW_PACKET_LIST cinfo = (tap_flags & TL_REQUIRES_COLUMNS) ? &cf->cinfo : NULL; @@ -1100,7 +1100,15 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf, } else fdata->flags.passed_dfilter = 1; - if( (fdata->flags.passed_dfilter) || (edt.pi.fd->flags.ref_time) ){ +#ifdef NEW_PACKET_LIST + epan_dissect_fill_in_columns(&edt, FALSE); + /* We always add the packet to the packet list store and do the filtering + * there instead. */ + row = new_packet_list_append(cinfo, fdata, &edt.pi); +#endif + + if( (fdata->flags.passed_dfilter) || (edt.pi.fd->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 */ @@ -1113,9 +1121,7 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf, cum_bytes += fdata->pkt_len; } -#ifdef NEW_PACKET_LIST - epan_dissect_fill_in_columns(&edt, FALSE); -#else +#ifndef NEW_PACKET_LIST epan_dissect_fill_in_columns(&edt, TRUE); #endif @@ -1138,9 +1144,7 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf, /* This is the last frame we've seen so far. */ cf->last_displayed = fdata; -#ifdef NEW_PACKET_LIST - row = new_packet_list_append(cinfo, fdata, &edt.pi); -#else +#ifndef NEW_PACKET_LIST row = packet_list_append(cinfo->col_data, fdata); /* colorize packet: first apply color filters @@ -1159,11 +1163,8 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf, prev_dis_ts = fdata->abs_ts; cf->displayed_count++; - } else { - /* This frame didn't pass the display filter, so it's not being added - to the clist, and thus has no row. */ - row = -1; } + epan_dissect_cleanup(&edt); return row; } |