forked from osmocom/wireshark
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>
This commit is contained in:
parent
6dedca3ece
commit
3a1bf2b87e
|
@ -21,6 +21,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
#include <wsutil/ws_printf.h>
|
||||||
|
|
||||||
#include "wtap-int.h"
|
#include "wtap-int.h"
|
||||||
#include "file_wrappers.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
|
* something we don't handle in that block, submit a change
|
||||||
* to the main Wireshark source).
|
* to the main Wireshark source).
|
||||||
*/
|
*/
|
||||||
pcapng_debug("Attempt to register plugin for block type 0x%08x not allowed",
|
ws_g_warning("Attempt to register plugin for block type 0x%08x not allowed",
|
||||||
block_type);
|
block_type);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case BLOCK_TYPE_IRIG_TS:
|
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
|
* No; don't allow a plugin to be registered for it, as
|
||||||
* the block type needs to be registered before it's used.
|
* 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",
|
ws_g_warning("Attempt to register plugin for reserved block type 0x%08x not allowed",
|
||||||
block_type);
|
block_type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue