aboutsummaryrefslogtreecommitdiffstats
path: root/extcap_spawn.h
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 /extcap_spawn.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_spawn.h')
-rw-r--r--extcap_spawn.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/extcap_spawn.h b/extcap_spawn.h
index b9b2ef491e..16d8a97a58 100644
--- a/extcap_spawn.h
+++ b/extcap_spawn.h
@@ -44,7 +44,7 @@ typedef struct _extcap_userdata {
gboolean extcap_spawn_sync ( gchar * dirname, gchar * command, gint argc, gchar ** argv, gchar ** command_output );
-GPid extcap_spawn_async ( interface_options * interface, GPtrArray * args );
+GPid extcap_spawn_async ( extcap_userdata * userdata, GPtrArray * args );
#ifdef _WIN32
gboolean extcap_wait_for_pipe(HANDLE pipe_h, HANDLE pid);