diff options
author | Roland Knall <roland.knall@br-automation.com> | 2016-02-11 07:48:54 +0100 |
---|---|---|
committer | Roland Knall <rknall@gmail.com> | 2016-02-11 08:49:54 +0000 |
commit | 3f43b1df447d1e8c130c0e06089f0ceca2a89794 (patch) | |
tree | 1280403cd5c3e5898a80c8692ea0f71ee56696f3 /extcap.c | |
parent | eefcbc0a591c1823697f2d049dbd921c97102611 (diff) |
extcap: Fix call to child watch
Child watch seems to keep executables in limbo, if extcap_cleanup
removed the watch before it could be fired at least once
Bug: 12080
Change-Id: I74afafe8545d464ec08b1043a6377a6450e4c772
Reviewed-on: https://code.wireshark.org/review/13900
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'extcap.c')
-rw-r--r-- | extcap.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -658,12 +658,6 @@ void extcap_cleanup(capture_options * capture_opts) { "Extcap [%s] - Closing spawned PID: %d", interface_opts.name, interface_opts.extcap_pid); - if (interface_opts.extcap_child_watch > 0) - { - g_source_remove(interface_opts.extcap_child_watch); - interface_opts.extcap_child_watch = 0; - } - if (interface_opts.extcap_pid != INVALID_EXTCAP_PID) { #ifdef _WIN32 @@ -712,7 +706,9 @@ static void extcap_child_watch_cb(GPid pid, gint status _U_, gpointer user_data) if (interface_opts.extcap_pid == pid) { interface_opts.extcap_pid = INVALID_EXTCAP_PID; + g_source_remove(interface_opts.extcap_child_watch); interface_opts.extcap_child_watch = 0; + capture_opts->ifaces = g_array_remove_index(capture_opts->ifaces, i); g_array_insert_val(capture_opts->ifaces, i, interface_opts); break; |