From 9ef47ae8c82abc1edc83408b4c2a93aaff40e282 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Fri, 27 Jun 2014 01:43:53 -0700 Subject: Report more information on a sync_xxx_open() call failure. Trying to get more information for http://ask.wireshark.org/questions/34057/waitpid-error-starting Change-Id: Ifc0eb58f5b69c2c4a4638aa95f6b5f8f628bef02 Reviewed-on: https://code.wireshark.org/review/2685 Reviewed-by: Guy Harris --- capchild/capture_ifinfo.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'capchild/capture_ifinfo.c') diff --git a/capchild/capture_ifinfo.c b/capchild/capture_ifinfo.c index 8f8c985d88..4b36e46b02 100644 --- a/capchild/capture_ifinfo.c +++ b/capchild/capture_ifinfo.c @@ -119,7 +119,9 @@ capture_interface_list(int *err, char **err_str, void (*update_cb)(void)) /* Try to get our interface list */ ret = sync_interface_list_open(&data, &primary_msg, &secondary_msg, update_cb); if (ret != 0) { - g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_MESSAGE, "Capture Interface List failed!"); + g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_MESSAGE, "Capture Interface List failed, error %d, %s (%s)!", + *err, primary_msg ? primary_msg : "no message", + secondary_msg ? secondary_msg : "no secondary message"); if (err_str) { *err_str = primary_msg; } else { @@ -219,7 +221,9 @@ capture_get_if_capabilities(const gchar *ifname, gboolean monitor_mode, err = sync_if_capabilities_open(ifname, monitor_mode, &data, &primary_msg, &secondary_msg, update_cb); if (err != 0) { - g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_MESSAGE, "Capture Interface Capabilities failed!"); + g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_MESSAGE, "Capture Interface Capabilities failed, error %d, %s (%s)!", + err, primary_msg ? primary_msg : "no message", + secondary_msg ? secondary_msg : "no secondary message"); if (err_str) { *err_str = primary_msg; } else { -- cgit v1.2.3