diff options
author | Dario Lombardo <lomato@gmail.com> | 2016-08-02 22:39:28 +0200 |
---|---|---|
committer | Roland Knall <rknall@gmail.com> | 2016-08-04 11:26:26 +0000 |
commit | 5adde36520cf71a87c51c3bde49068623eb4d3d4 (patch) | |
tree | 8f12c8752edc4a2b352f9f215bc8b49a1b8b260e /extcap/extcap-base.c | |
parent | 06464b7db1999b95a9b4166ceb636e4f46fcc7df (diff) |
extcap: restyle the output subsystem.
Change-Id: I3e0674751eb97bf30ae6d70c4e51f347d63b1697
Reviewed-on: https://code.wireshark.org/review/16849
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'extcap/extcap-base.c')
-rw-r--r-- | extcap/extcap-base.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/extcap/extcap-base.c b/extcap/extcap-base.c index ffe7b74040..837c297d6a 100644 --- a/extcap/extcap-base.c +++ b/extcap/extcap-base.c @@ -87,13 +87,13 @@ void attach_parent_console() /* Console attach succeeded */ if (outRedirected == FALSE) { if (!freopen("CONOUT$", "w", stdout)) { - errmsg_print("WARNING: Cannot redirect to stdout."); + g_warning("Cannot redirect to stdout."); } } if (errRedirected == FALSE) { if (!freopen("CONOUT$", "w", stderr)) { - errmsg_print("WARNING: Cannot redirect to strerr."); + g_warning("Cannot redirect to strerr."); } } } @@ -139,6 +139,13 @@ void extcap_base_set_util_info(extcap_parameters * extcap, const char * major, c uint8_t extcap_base_parse_options(extcap_parameters * extcap, int result, char * optargument ) { switch (result) { + case EXTCAP_OPT_DEBUG: +#ifdef _WIN32 + _putenv_s("G_MESSAGES_DEBUG", "all"); +#else + setenv("G_MESSAGES_DEBUG", "all", 1); +#endif + break; case EXTCAP_OPT_LIST_INTERFACES: extcap->do_list_interfaces = 1; break; @@ -227,7 +234,7 @@ uint8_t extcap_base_handle_interface(extcap_parameters * extcap) /* A fifo must be provided for capture */ if (extcap->capture && (extcap->fifo == NULL || strlen(extcap->fifo) <= 0)) { extcap->capture = 0; - errmsg_print("Extcap Error: No FIFO pipe provided"); + g_error("Extcap Error: No FIFO pipe provided"); return 0; } |