diff options
author | Anders Broman <anders.broman@ericsson.com> | 2013-02-28 17:55:07 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2013-02-28 17:55:07 +0000 |
commit | 6bf8fcfad4a79a3d18704283c7bc250bbf073044 (patch) | |
tree | 9503e08a9a7f111b2c7834a59c0ab8eb8fc1f90d /ui/gtk/capture_if_dlg.c | |
parent | fe16b9835f0e7eb8c4e2a682ab0e82b5aa00bc61 (diff) |
Avoid a packet rescan if we don't have an AirPcap adapter.
svn path=/trunk/; revision=47945
Diffstat (limited to 'ui/gtk/capture_if_dlg.c')
-rw-r--r-- | ui/gtk/capture_if_dlg.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/ui/gtk/capture_if_dlg.c b/ui/gtk/capture_if_dlg.c index 2bc82f42c5..05aaaef2ca 100644 --- a/ui/gtk/capture_if_dlg.c +++ b/ui/gtk/capture_if_dlg.c @@ -868,9 +868,6 @@ capture_if_cb(GtkWidget *w _U_, gpointer d _U_) #ifdef HAVE_AIRPCAP /* LOAD AIRPCAP INTERFACES */ - decryption_cb = g_object_get_data(G_OBJECT(wireless_tb),AIRPCAP_TOOLBAR_DECRYPTION_KEY); - update_decryption_mode_list(decryption_cb); - /* If no airpcap interface is present, gray everything */ if (airpcap_if_active == NULL) { if (airpcap_if_list == NULL) { @@ -878,13 +875,19 @@ capture_if_cb(GtkWidget *w _U_, gpointer d _U_) airpcap_enable_toolbar_widgets(wireless_tb,FALSE); } else { /* default adapter is not airpcap... or is airpcap but is not found*/ - if (airpcap_if_active) + if (airpcap_if_active){ + /* XXX can never happen? */ airpcap_set_toolbar_stop_capture(airpcap_if_active); + } airpcap_enable_toolbar_widgets(wireless_tb,FALSE); } } - if (airpcap_if_active) + if (airpcap_if_active){ + decryption_cb = g_object_get_data(G_OBJECT(wireless_tb),AIRPCAP_TOOLBAR_DECRYPTION_KEY); + /* XXXX update_decryption_mode_list() trigers a rescan, should only be done if the mode is changed */ + update_decryption_mode_list(decryption_cb); airpcap_set_toolbar_start_capture(airpcap_if_active); + } #endif cap_if_w = dlg_window_new("Wireshark: Capture Interfaces"); /* transient_for top_level */ |