Don't rescan packets when a display filter is added if we are capturing without "Updating list of packets in real time". There are no displayed packets to filter!

Bug: 6217
Change-Id: Ie4a90ff8a738d6c970d51598bf14b4b51ea069ce
Reviewed-on: https://code.wireshark.org/review/7918
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Michael Mann 2015-04-04 19:24:22 -04:00
parent 3a87a32a57
commit a11f7a7548
1 changed files with 3 additions and 0 deletions

3
file.c
View File

@ -1688,6 +1688,9 @@ cf_filter_packets(capture_file *cf, gchar *dftext, gboolean force)
cf->dfilter = dftext;
g_get_current_time(&start_time);
/* if we are capturing without displaying packets, there is nothing to filter */
if (cf->frames == NULL)
return CF_ERROR;
/* Now rescan the packet list, applying the new filter, but not
throwing away information constructed on a previous pass. */