aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/main.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2017-12-11 14:41:58 -0800
committerGerald Combs <gerald@wireshark.org>2017-12-11 23:29:00 +0000
commit34b62c60bfad56275dca48242c7e477f33b691ef (patch)
tree3370b3a9df2ce98d09a75419da725f3e97fb8b11 /ui/gtk/main.c
parent10e98462520b5dcfa1e5d7b80e53a95725d91d94 (diff)
Revert "Move fill_in_local_interfaces to a thread."
Calling scan_local_interfaces ends up calling fork via extcap. Doing so from a thread is ill-adivsed: https://rachelbythebay.com/w/2014/08/16/forkenv/ http://www.linuxprogrammingblog.com/threads-and-fork-think-twice-before-using-them This reverts commit 5b4894b7959f44e077f36194c490cbf402e1e659. Revert "fix compilation without pcap." as well. This reverts commit 51300b3c834a3877d567fb57ae78ec74ec8ba80d. Change-Id: Ic80582b52398c44af73c6d74dbb3216c4d1b37fc Reviewed-on: https://code.wireshark.org/review/24772 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/gtk/main.c')
-rw-r--r--ui/gtk/main.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/ui/gtk/main.c b/ui/gtk/main.c
index 2153a22a38..075f4995bf 100644
--- a/ui/gtk/main.c
+++ b/ui/gtk/main.c
@@ -2172,7 +2172,6 @@ main(int argc, char *argv[])
capture_session_init(&global_capture_session, &cfile);
#endif
- fill_in_local_interfaces_start();
init_report_message(vfailure_alert_box, vwarning_alert_box,
open_failure_alert_box, read_failure_alert_box,
@@ -2275,8 +2274,7 @@ main(int argc, char *argv[])
#ifdef HAVE_LIBPCAP
splash_update(RA_INTERFACES, NULL, (gpointer)splash_win);
- fill_in_local_interfaces_wait(main_window_update);
- g_mutex_lock(&global_capture_opts_mtx);
+ fill_in_local_interfaces(main_window_update);
if (global_commandline_info.list_link_layer_types)
caps_queries |= CAPS_QUERY_LINK_TYPES;
@@ -2613,7 +2611,6 @@ main(int argc, char *argv[])
if (!global_commandline_info.start_capture && !global_capture_opts.default_options.cfilter) {
global_capture_opts.default_options.cfilter = g_strdup(get_conn_cfilter());
}
- g_mutex_unlock(&global_capture_opts_mtx);
#else /* HAVE_LIBPCAP */
show_main_window(FALSE);
check_and_warn_user_startup(global_commandline_info.cf_name);