aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/capture_if_dlg.c
diff options
context:
space:
mode:
authorMichael Tüxen <tuexen@fh-muenster.de>2011-07-16 11:07:32 +0000
committerMichael Tüxen <tuexen@fh-muenster.de>2011-07-16 11:07:32 +0000
commit09af2bc6d2ecf2e2d085d9149e714ad36baf1097 (patch)
treeb5139f86952ce3374ac274100f8e67ccd1d32bd6 /gtk/capture_if_dlg.c
parentd00167886f226b71b7176b1ac0c438cd242a39bb (diff)
Don't allow capturing from multiple interface when compiled with multiple thread
support. svn path=/trunk/; revision=38057
Diffstat (limited to 'gtk/capture_if_dlg.c')
-rw-r--r--gtk/capture_if_dlg.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gtk/capture_if_dlg.c b/gtk/capture_if_dlg.c
index dd48920ea9..3871376e9c 100644
--- a/gtk/capture_if_dlg.c
+++ b/gtk/capture_if_dlg.c
@@ -158,7 +158,11 @@ store_selected(GtkWidget *choose_bt _U_, gpointer if_data)
}
}
if (cap_if_w) {
+#ifdef USE_THREADS
gtk_widget_set_sensitive(capture_bt, !gbl_capture_in_progress && (currently_selected > 0));
+#else
+ gtk_widget_set_sensitive(capture_bt, !gbl_capture_in_progress && (currently_selected == 1));
+#endif
gtk_widget_set_sensitive(options_bt, !gbl_capture_in_progress && (currently_selected <= 1));
}
}
@@ -237,7 +241,7 @@ capture_do_cb(GtkWidget *capture_bt _U_, gpointer if_data _U_)
global_capture_opts.save_file = NULL;
}
- if (global_capture_opts.ifaces->len >= 2) {
+ if (global_capture_opts.ifaces->len > 1) {
global_capture_opts.use_pcapng = TRUE;
}
/* stop capturing from all interfaces, we are going to do real work now ... */
@@ -306,7 +310,7 @@ capture_prepare_cb(GtkWidget *prepare_bt _U_, gpointer if_data _U_)
}
/* stop capturing from all interfaces, we are going to do real work now ... */
window_destroy(cap_if_w);
- if (global_capture_opts.ifaces->len >= 2) {
+ if (global_capture_opts.ifaces->len > 1) {
global_capture_opts.use_pcapng = TRUE;
}
capture_prep_cb(NULL, NULL);
@@ -389,7 +393,11 @@ set_capture_if_dialog_for_capture_in_progress(gboolean capture_in_progress)
gbl_capture_in_progress = capture_in_progress;
if (cap_if_w) {
gtk_widget_set_sensitive(stop_bt, capture_in_progress);
+#ifdef USE_THREADS
gtk_widget_set_sensitive(capture_bt, !capture_in_progress && (currently_selected > 0));
+#else
+ gtk_widget_set_sensitive(capture_bt, !capture_in_progress && (currently_selected == 1));
+#endif
gtk_widget_set_sensitive(options_bt, !capture_in_progress && (currently_selected <= 1));
}
}