From 3a1bf2b87e2677a17d4a6d3844726613d214e6b8 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 13 May 2018 23:05:12 -0700 Subject: 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 --- wiretap/pcapng.c | 9 +++++---- 1 file 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 #include +#include #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; } -- cgit v1.2.3