aboutsummaryrefslogtreecommitdiffstats
path: root/capchild
diff options
context:
space:
mode:
authorRoland Knall <roland.knall@br-automation.com>2016-01-04 18:32:39 +0100
committerAnders Broman <a.broman58@gmail.com>2016-07-30 21:15:39 +0000
commitc611eded2272ac79997fb3ce11f2339dc32b53cb (patch)
tree48d73f9ed21c55448ae77fae24020cf4763da2c7 /capchild
parentc2ac9c5c0316a27f54830fae0b70cf7825c6d99c (diff)
extcap: Use stderr to print error message
This patch reads out the stderr messages from an extcap utility and displays it to an user. It was tested on Qt but not on GTK, but should work their as well. On Mac OS/X and Windows the child_watch does not behave as it was intended. Therefore in extcap_cleanup, the callbacks are called manually, if and only if, they have not been called already. The reason why it displays two error messages is, that by the time the first one is being displayed, glib has not returned from the spawned process on Linux yet. So there is no way to add the stderr correctly, and putting a handler to stderr into interface_opts will lead to memory errors, cause then the code tries to access memory outside of its protection. Bug: 11892 Change-Id: I2db60dd480fed3e01428b91a705057e4f088bd15 Reviewed-on: https://code.wireshark.org/review/12954 Reviewed-by: Roland Knall <rknall@gmail.com> Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'capchild')
-rw-r--r--capchild/capture_sync.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/capchild/capture_sync.c b/capchild/capture_sync.c
index 28c34a5542..5c62e2c437 100644
--- a/capchild/capture_sync.c
+++ b/capchild/capture_sync.c
@@ -1733,7 +1733,7 @@ sync_pipe_input_cb(gint source, gpointer user_data)
#endif
#ifdef HAVE_EXTCAP
g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_DEBUG, "sync_pipe_input_cb: cleaning extcap pipe");
- extcap_if_cleanup(cap_session->capture_opts);
+ extcap_if_cleanup(cap_session->capture_opts, &primary_msg);
#endif
capture_input_closed(cap_session, primary_msg);
g_free(primary_msg);