path: root/extcap.h
diff options
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 /extcap.h
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 'extcap.h')
1 files changed, 1 insertions, 3 deletions
diff --git a/extcap.h b/extcap.h
index d8e94b9fad..254bd9fa3a 100644
--- a/extcap.h
+++ b/extcap.h
@@ -28,8 +28,6 @@
#include <glib.h>
-#include "ws_symbol_export.h"
#ifdef _WIN32
#include <windows.h>
#include <wsutil/unicode-utils.h>
@@ -102,7 +100,7 @@ extcap_create_pipe(char ** fifo);
/* Clean up all if related stuff */
-extcap_if_cleanup(capture_options * capture_opts _U_);
+extcap_if_cleanup(capture_options * capture_opts _U_, gchar ** errormsg);
struct preference *
extcap_pref_for_argument(const gchar *ifname, struct _extcap_arg * arg);