diff options
author | Evan Huus <eapache@gmail.com> | 2013-03-28 14:54:33 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2013-03-28 14:54:33 +0000 |
commit | 20e049795fdc98d06957f90b54604d02735582e8 (patch) | |
tree | bbdd66c5e8019572f730b8517caeac890dec77a6 /ui | |
parent | c9004d102e6ee07fb60f0b3934b72193f6ad39b9 (diff) |
If wireshark is started with a file and a display filter, apply the display
filter *after* initially reading the file so that we get the expected multi-
pass behaviour and forward-looking filters (like response_in) work properly.
svn path=/trunk/; revision=48615
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gtk/main.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/ui/gtk/main.c b/ui/gtk/main.c index 4726c03016..53fcaeac7c 100644 --- a/ui/gtk/main.c +++ b/ui/gtk/main.c @@ -3049,15 +3049,6 @@ main(int argc, char *argv[]) g_timeout_add(info_update_freq, resolv_update_cb, NULL); - if (dfilter) { - GtkWidget *filter_te; - filter_te = gtk_bin_get_child(GTK_BIN(g_object_get_data(G_OBJECT(top_level), E_DFILTER_CM_KEY))); - gtk_entry_set_text(GTK_ENTRY(filter_te), dfilter); - - /* Run the display filter so it goes in effect. */ - main_filter_packets(&cfile, dfilter, FALSE); - } - /* If we were given the name of a capture file, read it in now; we defer it until now, so that, if we can't open it, and pop up an alert box, the alert box is more likely to come up on @@ -3196,6 +3187,16 @@ main(int argc, char *argv[]) #endif /* HAVE_LIBPCAP */ } + if (dfilter) { + GtkWidget *filter_te; + filter_te = gtk_bin_get_child(GTK_BIN(g_object_get_data(G_OBJECT(top_level), E_DFILTER_CM_KEY))); + gtk_entry_set_text(GTK_ENTRY(filter_te), dfilter); + + /* Run the display filter so it goes in effect. */ + main_filter_packets(&cfile, dfilter, FALSE); + } + + /* register our pid if we are being run from a U3 device */ u3_register_pid(); |