diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-05-13 23:05:12 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-05-14 06:07:05 +0000 |
commit | 3a1bf2b87e2677a17d4a6d3844726613d214e6b8 (patch) | |
tree | fc0849a319ce52b019b8209bd76343ead2154678 /wiretap/pcapng.c | |
parent | 6dedca3ecec21d7c0b270e365f16b424de4bb9a4 (diff) |
Use ws_g_warning() for plugin registration errors.
Those should always be reported, as they indicate that a block type
plugin is trying to do something we don't allow.
We should probably have a mechanism by which ws_g_warning() messages are
logged to the standard error for command-line programs, logged to an
error message window for GUI programs, and logged to some form of system
log for daemons. For now, it's a good way to log non-fatal errors that
should always be shown in *some* fashion, as well as to mark messages
that should be handled in the form described in the previous sentence.
Change-Id: Ieedf87fc2dd3184a4466ae69af01f799165c1b70
Reviewed-on: https://code.wireshark.org/review/27519
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/pcapng.c')
-rw-r--r-- | wiretap/pcapng.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/wiretap/pcapng.c b/wiretap/pcapng.c index b899f5b098..efd9054866 100644 --- a/wiretap/pcapng.c +++ b/wiretap/pcapng.c @@ -21,6 +21,7 @@ #include <string.h> #include <errno.h> +#include <wsutil/ws_printf.h> #include "wtap-int.h" #include "file_wrappers.h" @@ -251,8 +252,8 @@ register_pcapng_block_type_handler(guint block_type, block_reader reader, * something we don't handle in that block, submit a change * to the main Wireshark source). */ - pcapng_debug("Attempt to register plugin for block type 0x%08x not allowed", - block_type); + ws_g_warning("Attempt to register plugin for block type 0x%08x not allowed", + block_type); return; case BLOCK_TYPE_IRIG_TS: @@ -275,8 +276,8 @@ register_pcapng_block_type_handler(guint block_type, block_reader reader, * No; don't allow a plugin to be registered for it, as * the block type needs to be registered before it's used. */ - pcapng_debug("Attempt to register plugin for reserved block type 0x%08x not allowed", - block_type); + ws_g_warning("Attempt to register plugin for reserved block type 0x%08x not allowed", + block_type); return; } |