return; /* error in options dialog */
}
+#ifndef USE_THREADS
+ if (global_capture_opts.ifaces->len > 1) {
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
+ "You specified multiple interfaces for capturing which this version of Wireshark doesn't support.");
+ return;
+ }
+#endif
if (global_capture_opts.ifaces->len == 0) {
if (prefs.capture_device == NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
}
}
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));
}
}
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 ... */
}
/* 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);
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));
}
}
prefs_apply_all();
#ifdef HAVE_LIBPCAP
+#ifndef USE_THREADS
+ if ((global_capture_opts.ifaces->len > 0) && start_capture) {
+ cmdarg_err("You specified multiple interfaces for capturing which this version of Wireshark doesn't support.");
+ exit(2);
+ }
+#endif
if ((global_capture_opts.ifaces->len == 0) &&
(prefs.capture_device != NULL)) {
interface_options interface_opts;
one of MATE's late-registered fields as part of the filter. */
start_requested_stats();
}
- }
- else {
+ } else {
show_main_window(FALSE);
check_and_warn_user_startup(cf_name);
set_menus_for_capture_in_progress(FALSE);
view = g_object_get_data(G_OBJECT(welcome_hb), TREE_VIEW_INTERFACES);
entry = gtk_tree_view_get_selection(GTK_TREE_VIEW(view));
len = gtk_tree_selection_count_selected_rows(entry);
- if (!entry || len==0) {
+ if (!entry || len == 0) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"You didn't specify an interface on which to capture packets.");
return;
}
+#ifndef USE_THREADS
+ if (len > 1) {
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
+ "You specified multiple interfaces for capturing which this version of Wireshark doesn't support.");
+ return;
+ }
+#endif
while (global_capture_opts.ifaces->len > 0) {
interface_opts = g_array_index(global_capture_opts.ifaces, interface_options, 0);
global_capture_opts.ifaces = g_array_remove_index(global_capture_opts.ifaces, 0);
gtk_tree_view_column_set_visible(column, FALSE);
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(if_view));
gtk_tree_selection_set_mode(selection, GTK_SELECTION_MULTIPLE);
+#ifdef USE_THREADS
item_hb = welcome_button(WIRESHARK_STOCK_CAPTURE_START,
"Start",
"Choose one or more interfaces to capture from, then <b>Start</b>",
"Same as Capture/Interfaces with default options",
(welcome_button_callback_t)capture_if_start, (gpointer)if_view);
+#else
+ item_hb = welcome_button(WIRESHARK_STOCK_CAPTURE_START,
+ "Start",
+ "Choose exactly one interface to capture from, then <b>Start</b>",
+ "Same as Capture/Interfaces with default options",
+ (welcome_button_callback_t)capture_if_start, (gpointer)if_view);
+#endif
gtk_box_pack_start(GTK_BOX(topic_to_fill), item_hb, FALSE, FALSE, 5);
welcome_if_tree_load();
gtk_container_add (GTK_CONTAINER (swindow), if_view);