Replace g_log() calls with ws_log()

pespin/rlcmac
João Valverde 1 year ago committed by Wireshark GitLab Utility
parent 4c4bb915c8
commit 39df3ae3c0
  1. 5
      epan/capture_dissectors.c
  2. 4
      epan/color_filters.c
  3. 4
      epan/crypt/dot11decrypt_debug.h
  4. 4
      epan/dfilter/dfilter.c
  5. 10
      epan/disabled_protos.c
  6. 4
      epan/epan.c
  7. 5
      epan/expert.c
  8. 2
      epan/maxmind_db.c
  9. 22
      epan/packet.c
  10. 64
      epan/prefs.c
  11. 112
      epan/proto.c
  12. 15
      epan/secrets.c
  13. 2
      epan/sequence_analysis.h
  14. 5
      epan/show_exception.c
  15. 8
      epan/tap.c
  16. 90
      epan/tvbparse.c
  17. 11
      epan/value_string.c
  18. 5
      epan/wmem/wmem_core.c
  19. 4
      epan/wmem/wmem_strbuf.c
  20. 4
      epan/wslua/init_wslua.c
  21. 1
      epan/wslua/wslua.h
  22. 8
      epan/wslua/wslua_file.c
  23. 8
      epan/wslua/wslua_file_handler.c
  24. 4
      epan/wslua/wslua_frame_info.c
  25. 24
      epan/wslua/wslua_gui.c
  26. 4
      epan/wslua/wslua_internals.c
  27. 16
      epan/wslua/wslua_listener.c
  28. 6
      epan/wslua/wslua_util.c
  29. 274
      extcap/androiddump.c
  30. 58
      extcap/ciscodump.c
  31. 60
      extcap/dpauxmon.c
  32. 4
      extcap/etw_message.c
  33. 26
      extcap/etwdump.c
  34. 6
      extcap/extcap-base.c
  35. 26
      extcap/randpktdump.c
  36. 66
      extcap/sdjournal.c
  37. 2
      extcap/ssh-base.c
  38. 54
      extcap/sshdump.c
  39. 42
      extcap/udpdump.c
  40. 18
      file.c
  41. 2
      file_packet_provider.c
  42. 8
      plugins/epan/irda/packet-irda.c
  43. 4
      plugins/epan/mate/mate.h
  44. 8
      plugins/epan/mate/mate_util.c
  45. 4
      plugins/epan/transum/packet-transum.c
  46. 4
      randpkt_core/randpkt_core.c
  47. 6
      sharkd_daemon.c
  48. 8
      sync_pipe_write.c
  49. 6
      ui/capture.c
  50. 4
      ui/cli/tap-httpstat.c
  51. 4
      ui/cli/tap-rtspstat.c
  52. 4
      ui/cli/tap-sipstat.c
  53. 14
      ui/filter_files.c
  54. 2
      ui/preference_utils.c
  55. 2
      ui/rtp_stream.h
  56. 2
      ui/voip_calls.h
  57. 22
      wiretap/file_access.c
  58. 6
      wiretap/lanalyzer.c
  59. 2
      wiretap/log3gpp.c
  60. 4
      wiretap/pcapng.c
  61. 2
      wiretap/wtap.c
  62. 6
      wsutil/buffer.c
  63. 2
      wsutil/codecs.c
  64. 8
      wsutil/inet_addr.c
  65. 5
      wsutil/json_dumper.c
  66. 6
      wsutil/plugins.c
  67. 4
      wsutil/privileges.c
  68. 4
      wsutil/time_util.c

@ -9,6 +9,7 @@
*/
#include "config.h"
#define WS_LOG_DOMAIN LOG_DOMAIN_EPAN
#include <glib.h>
#include <stdio.h>
@ -17,6 +18,8 @@
#include "capture_dissectors.h"
#include <wsutil/wslog.h>
struct capture_dissector_table {
GHashTable *hash_table;
const char *ui_name;
@ -65,7 +68,7 @@ void register_capture_dissector_table(const char *name, const char *ui_name)
/* Make sure the registration is unique */
if(g_hash_table_lookup( capture_dissector_tables, name )) {
g_error("The capture dissector table %s (%s) is already registered - are you using a buggy plugin?", name, ui_name);
ws_error("The capture dissector table %s (%s) is already registered - are you using a buggy plugin?", name, ui_name);
}
sub_dissectors = g_new(struct capture_dissector_table, 1);

@ -12,6 +12,7 @@
*/
#include <config.h>
#define WS_LOG_DOMAIN LOG_DOMAIN_EPAN
#include <glib.h>
@ -21,6 +22,7 @@
#include <wsutil/filesystem.h>
#include <wsutil/file_util.h>
#include <wsutil/wslog.h>
#include <epan/packet.h>
#include "color_filters.h"
@ -651,7 +653,7 @@ read_filters_file(const gchar *path, FILE *f, gpointer user_data, color_filter_a
gchar *local_err_msg = NULL;
if (!disabled && !dfilter_compile(filter_exp, &temp_dfilter, &local_err_msg)) {
g_warning("Could not compile \"%s\" in colorfilters file \"%s\".\n%s",
ws_warning("Could not compile \"%s\" in colorfilters file \"%s\".\n%s",
name, path, local_err_msg);
g_free(local_err_msg);
prefs.unknown_colorfilters = TRUE;

@ -34,7 +34,7 @@
static inline void print_debug_line(const CHAR *function, const CHAR *msg, const INT level)
{
if (level <= DEBUG_USED_LEVEL)
g_warning("dbg(%d)|(%s) %s", level, function, msg);
ws_warning("dbg(%d)|(%s) %s", level, function, msg);
}
#define DEBUG_PRINT_LINE(msg, level) print_debug_line(G_STRFUNC , msg, level)
@ -42,7 +42,7 @@ static inline void print_debug_line(const CHAR *function, const CHAR *msg, const
static inline void DEBUG_DUMP(const char* x, const guint8* y, int z)
{
char* tmp_str = bytes_to_str(NULL, y, (z));
g_warning("%s: %s", x, tmp_str);
ws_warning("%s: %s", x, tmp_str);
wmem_free(NULL, tmp_str);
}

@ -7,6 +7,7 @@
*/
#include "config.h"
#define WS_LOG_DOMAIN "Dfilter"
#include <stdio.h>
#include <string.h>
@ -20,6 +21,7 @@
#include "dfilter.h"
#include "dfilter-macro.h"
#include "scanner_lex.h"
#include <wsutil/wslog.h>
#define DFILTER_TOKEN_ID_OFFSET 1
@ -52,7 +54,7 @@ void
dfilter_init(void)
{
if (ParserObj) {
g_message("I expected ParserObj to be NULL\n");
ws_message("I expected ParserObj to be NULL\n");
/* Free the Lemon Parser object */
DfilterFree(ParserObj, g_free);
}

@ -10,6 +10,7 @@
*/
#include "config.h"
#define WS_LOG_DOMAIN LOG_DOMAIN_EPAN
#include <stdio.h>
#include <string.h>
@ -24,6 +25,7 @@
#include "disabled_protos.h"
#include <wsutil/file_util.h>
#include <wsutil/report_message.h>
#include <wsutil/wslog.h>
#define ENABLED_PROTOCOLS_FILE_NAME "enabled_protos"
#define DISABLED_PROTOCOLS_FILE_NAME "disabled_protos"
@ -320,7 +322,7 @@ read_protos_list_file(const char *ff_path, FILE *ff, GList **flp)
if (c != EOF && c != '\n' && c != '#') {
/* Non-white-space after the protocol name; warn about it,
in case we come up with a reason to use it. */
g_warning("'%s' line %d has extra stuff after the protocol name.",
ws_warning("'%s' line %d has extra stuff after the protocol name.",
ff_path, line);
}
}
@ -335,7 +337,7 @@ read_protos_list_file(const char *ff_path, FILE *ff, GList **flp)
goto error; /* I/O error */
else {
/* EOF, not error; no newline seen before EOF */
g_warning("'%s' line %d doesn't have a newline.", ff_path,
ws_warning("'%s' line %d doesn't have a newline.", ff_path,
line);
}
break; /* nothing more to read */
@ -641,7 +643,7 @@ read_heur_dissector_list_file(const char *ff_path, FILE *ff, GList **flp)
if (c != EOF && c != '\n' && c != '#') {
/* Non-white-space after the protocol name; warn about it,
in case we come up with a reason to use it. */
g_warning("'%s' line %d has extra stuff after the protocol name.",
ws_warning("'%s' line %d has extra stuff after the protocol name.",
ff_path, line);
}
}
@ -656,7 +658,7 @@ read_heur_dissector_list_file(const char *ff_path, FILE *ff, GList **flp)
goto error; /* I/O error */
else {
/* EOF, not error; no newline seen before EOF */
g_warning("'%s' line %d doesn't have a newline.", ff_path,
ws_warning("'%s' line %d doesn't have a newline.", ff_path,
line);
}
break; /* nothing more to read */

@ -199,7 +199,7 @@ void epan_register_plugin(const epan_plugin *plug)
#else /* HAVE_PLUGINS */
void epan_register_plugin(const epan_plugin *plug _U_)
{
g_warning("epan_register_plugin: built without support for binary plugins");
ws_warning("epan_register_plugin: built without support for binary plugins");
}
#endif /* HAVE_PLUGINS */
@ -479,7 +479,7 @@ epan_get_frame_ts(const epan_t *session, guint32 frame_num)
abs_ts = session->funcs.get_frame_ts(session->prov, frame_num);
if (!abs_ts)
g_warning("!!! couldn't get frame ts for %u !!!\n", frame_num);
ws_warning("!!! couldn't get frame ts for %u !!!\n", frame_num);
return abs_ts;
}

@ -11,6 +11,7 @@
*/
#include "config.h"
#define WS_LOG_DOMAIN LOG_DOMAIN_EPAN
#include <stdio.h>
#include <stdlib.h>
@ -22,6 +23,8 @@
#include "wmem/wmem.h"
#include "tap.h"
#include <wsutil/wslog.h>
/* proto_expert cannot be static because it's referenced in the
* print routines
*/
@ -173,7 +176,7 @@ static void uat_expert_post_update_cb(void)
#define EXPERT_REGISTRAR_GET_NTH(eiindex, expinfo) \
if((guint)eiindex >= gpa_expertinfo.len && wireshark_abort_on_dissector_bug) \
g_error("Unregistered expert info! index=%d", eiindex); \
ws_error("Unregistered expert info! index=%d", eiindex); \
DISSECTOR_ASSERT_HINT((guint)eiindex < gpa_expertinfo.len, "Unregistered expert info!"); \
DISSECTOR_ASSERT_HINT(gpa_expertinfo.ei[eiindex] != NULL, "Unregistered expert info!"); \
expinfo = gpa_expertinfo.ei[eiindex];

@ -104,7 +104,7 @@ static gboolean resolve_synchronously = FALSE;
#if 0
#define MMDB_DEBUG(...) { \
char *MMDB_DEBUG_MSG = g_strdup_printf(__VA_ARGS__); \
g_warning("mmdb: %s:%d %s", G_STRFUNC, __LINE__, MMDB_DEBUG_MSG); \
ws_warning("mmdb: %s:%d %s", G_STRFUNC, __LINE__, MMDB_DEBUG_MSG); \
g_free(MMDB_DEBUG_MSG); \
}
#else

@ -9,6 +9,7 @@
*/
#include "config.h"
#define WS_LOG_DOMAIN LOG_DOMAIN_EPAN
#include <glib.h>
@ -39,6 +40,7 @@
#include <epan/range.h>
#include <wsutil/str_util.h>
#include <wsutil/wslog.h>
static gint proto_malformed = -1;
static dissector_handle_t frame_handle = NULL;
@ -970,7 +972,7 @@ find_dissector_table(const char *name)
dissector_table = (dissector_table_t) g_hash_table_lookup(dissector_tables, new_name);
}
if (dissector_table) {
g_warning("%s is now %s", name, new_name);
ws_warning("%s is now %s", name, new_name);
}
}
return dissector_table;
@ -1016,13 +1018,13 @@ dissector_add_uint_sanity_check(const char *name, guint32 pattern, dissector_han
dtbl_entry_t *dtbl_entry;
if (pattern == 0) {
g_warning("%s: %s registering using a pattern of 0",
ws_warning("%s: %s registering using a pattern of 0",
name, proto_get_protocol_filter_name(proto_get_id(handle->protocol)));
}
dtbl_entry = g_hash_table_lookup(sub_dissectors->hash_table, GUINT_TO_POINTER(pattern));
if (dtbl_entry != NULL) {
g_warning("%s: %s registering using pattern %d already registered by %s",
ws_warning("%s: %s registering using pattern %d already registered by %s",
name, proto_get_protocol_filter_name(proto_get_id(handle->protocol)),
pattern, proto_get_protocol_filter_name(proto_get_id(dtbl_entry->initial->protocol)));
}
@ -1209,7 +1211,7 @@ void dissector_add_uint_range_with_preference(const char *name, const char* rang
break;
default:
g_error("The dissector table %s (%s) is not an integer type - are you using a buggy plugin?", name, pref_dissector_table->ui_name);
ws_error("The dissector table %s (%s) is not an integer type - are you using a buggy plugin?", name, pref_dissector_table->ui_name);
g_assert_not_reached();
}
@ -2451,7 +2453,7 @@ register_dissector_table(const char *name, const char *ui_name, const int proto,
/* Make sure the registration is unique */
if (g_hash_table_lookup(dissector_tables, name)) {
g_error("The dissector table %s (%s) is already registered - are you using a buggy plugin?", name, ui_name);
ws_error("The dissector table %s (%s) is already registered - are you using a buggy plugin?", name, ui_name);
}
/* Create and register the dissector table for this name; returns */
@ -2503,7 +2505,7 @@ register_dissector_table(const char *name, const char *ui_name, const int proto,
break;
default:
g_error("The dissector table %s (%s) is registering an unsupported type - are you using a buggy plugin?", name, ui_name);
ws_error("The dissector table %s (%s) is registering an unsupported type - are you using a buggy plugin?", name, ui_name);
g_assert_not_reached();
}
sub_dissectors->dissector_handles = NULL;
@ -2523,7 +2525,7 @@ dissector_table_t register_custom_dissector_table(const char *name,
/* Make sure the registration is unique */
if (g_hash_table_lookup(dissector_tables, name)) {
g_error("The dissector table %s (%s) is already registered - are you using a buggy plugin?", name, ui_name);
ws_error("The dissector table %s (%s) is already registered - are you using a buggy plugin?", name, ui_name);
}
/* Create and register the dissector table for this name; returns */
@ -2624,7 +2626,7 @@ check_valid_heur_name_or_fail(const char *heur_name)
}
if (found_invalid) {
g_error("Heuristic Protocol internal name \"%s\" has one or more invalid characters."
ws_error("Heuristic Protocol internal name \"%s\" has one or more invalid characters."
" Allowed are lowercase, digits, '-', '_' and non-repeating '.'."
" This might be caused by an inappropriate plugin or a development error.", heur_name);
}
@ -2697,7 +2699,7 @@ heur_dissector_add(const char *name, heur_dissector_t dissector, const char *dis
/* Ensure short_name is unique */
if (g_hash_table_lookup(heuristic_short_names, internal_name) != NULL) {
g_error("Duplicate heuristic short_name \"%s\"!"
ws_error("Duplicate heuristic short_name \"%s\"!"
" This might be caused by an inappropriate plugin or a development error.", internal_name);
}
@ -3012,7 +3014,7 @@ register_heur_dissector_list(const char *name, const int proto)
/* Make sure the registration is unique */
if (g_hash_table_lookup(heur_dissector_lists, name) != NULL) {
g_error("The heuristic dissector list %s is already registered - are you using a buggy plugin?", name);
ws_error("The heuristic dissector list %s is already registered - are you using a buggy plugin?", name);
}
/* Create and register the dissector table for this name; returns */

@ -9,6 +9,7 @@
*/
#include "config.h"
#define WS_LOG_DOMAIN LOG_DOMAIN_EPAN
#include "ws_diag_control.h"
@ -33,6 +34,7 @@
#include "print.h"
#include <wsutil/file_util.h>
#include <wsutil/report_message.h>
#include <wsutil/wslog.h>
#include <epan/prefs-int.h>
#include <epan/uat-int.h>
@ -504,7 +506,7 @@ prefs_register_module_or_subtree(module_t *parent, const char *name,
for (p = name; (c = *p) != '\0'; p++) {
if (!(g_ascii_islower(c) || g_ascii_isdigit(c) || c == '_' ||
c == '-' || c == '.'))
g_error("Preference module \"%s\" contains invalid characters", name);
ws_error("Preference module \"%s\" contains invalid characters", name);
}
/*
@ -520,7 +522,7 @@ prefs_register_module_or_subtree(module_t *parent, const char *name,
* something such as that, to be added to all their names).
*/
if (prefs_find_module(name) != NULL)
g_error("Preference module \"%s\" is being registered twice", name);
ws_error("Preference module \"%s\" is being registered twice", name);
/*
* Insert this module in the list of all modules.
@ -532,7 +534,7 @@ prefs_register_module_or_subtree(module_t *parent, const char *name,
* subtree, and crash if it's not.
*/
if (!is_subtree)
g_error("Preferences module with no name is being registered at the top level");
ws_error("Preferences module with no name is being registered at the top level");
}
/*
@ -579,7 +581,7 @@ prefs_register_module_alias(const char *name, module_t *module)
for (p = name; (c = *p) != '\0'; p++) {
if (!(g_ascii_isalpha(c) || g_ascii_isdigit(c) || c == '_' ||
c == '-' || c == '.'))
g_error("Preference module alias \"%s\" contains invalid characters", name);
ws_error("Preference module alias \"%s\" contains invalid characters", name);
}
/*
@ -591,7 +593,7 @@ prefs_register_module_alias(const char *name, module_t *module)
* We search the list of all aliases.
*/
if (prefs_find_module_alias(name) != NULL)
g_error("Preference module alias \"%s\" is being registered twice", name);
ws_error("Preference module alias \"%s\" is being registered twice", name);
alias = wmem_new(wmem_epan_scope(), module_alias_t);
alias->name = name;
@ -626,7 +628,7 @@ prefs_register_protocol(int id, void (*apply_cb)(void))
}
protocol = find_protocol_by_id(id);
if (protocol == NULL)
g_error("Protocol preferences being registered with an invalid protocol ID");
ws_error("Protocol preferences being registered with an invalid protocol ID");
return prefs_register_module(protocols_module,
proto_get_protocol_filter_name(id),
proto_get_protocol_short_name(protocol),
@ -638,7 +640,7 @@ prefs_deregister_protocol (int id)
{
protocol_t *protocol = find_protocol_by_id(id);
if (protocol == NULL)
g_error("Protocol preferences being de-registered with an invalid protocol ID");
ws_error("Protocol preferences being de-registered with an invalid protocol ID");
prefs_deregister_module (protocols_module,
proto_get_protocol_filter_name(id),
proto_get_protocol_short_name(protocol));
@ -698,7 +700,7 @@ prefs_register_protocol_subtree(const char *subtree, int id, void (*apply_cb)(vo
protocol = find_protocol_by_id(id);
if (protocol == NULL)
g_error("Protocol subtree being registered with an invalid protocol ID");
ws_error("Protocol subtree being registered with an invalid protocol ID");
return prefs_register_module(subtree_module,
proto_get_protocol_filter_name(id),
proto_get_protocol_short_name(protocol),
@ -729,7 +731,7 @@ prefs_register_protocol_obsolete(int id)
}
protocol = find_protocol_by_id(id);
if (protocol == NULL)
g_error("Protocol being registered with an invalid protocol ID");
ws_error("Protocol being registered with an invalid protocol ID");
module = prefs_register_module(protocols_module,
proto_get_protocol_filter_name(id),
proto_get_protocol_short_name(protocol),
@ -1005,7 +1007,7 @@ register_preference(module_t *module, const char *name, const char *title,
*/
for (p = name; *p != '\0'; p++)
if (!(g_ascii_islower(*p) || g_ascii_isdigit(*p) || *p == '_' || *p == '.'))
g_error("Preference \"%s.%s\" contains invalid characters", module->name, name);
ws_error("Preference \"%s.%s\" contains invalid characters", module->name, name);
/*
* Make sure there's not already a preference with that
@ -1014,7 +1016,7 @@ register_preference(module_t *module, const char *name, const char *title,
* more than one preference with the same name.
*/
if (prefs_find_preference(module, name) != NULL)
g_error("Preference %s has already been registered", name);
ws_error("Preference %s has already been registered", name);
if ((!IS_PREF_OBSOLETE(type)) &&
/* Don't compare if it's a subtree */
@ -1025,30 +1027,30 @@ register_preference(module_t *module, const char *name, const char *title,
*/
if (!((strncmp(name, module->name, strlen(module->name)) != 0) ||
(((name[strlen(module->name)]) != '.') && ((name[strlen(module->name)]) != '_'))))
g_error("Preference %s begins with the module name", name);
ws_error("Preference %s begins with the module name", name);
}
/* The title shows up in the preferences dialog. Make sure it's UI-friendly. */
if (preference->title) {
const char *cur_char;
if (preference->type != PREF_STATIC_TEXT && g_utf8_strlen(preference->title, -1) > 80) { // Arbitrary.
g_error("Title for preference %s.%s is too long: %s", name_prefix, preference->name, preference->title);
ws_error("Title for preference %s.%s is too long: %s", name_prefix, preference->name, preference->title);
}
if (!g_utf8_validate(preference->title, -1, NULL)) {
g_error("Title for preference %s.%s isn't valid UTF-8.", name_prefix, preference->name);
ws_error("Title for preference %s.%s isn't valid UTF-8.", name_prefix, preference->name);
}
for (cur_char = preference->title; *cur_char; cur_char = g_utf8_next_char(cur_char)) {
if (!g_unichar_isprint(g_utf8_get_char(cur_char))) {
g_error("Title for preference %s.%s isn't printable UTF-8.", name_prefix, preference->name);
ws_error("Title for preference %s.%s isn't printable UTF-8.", name_prefix, preference->name);
}
}
}
if (preference->description) {
if (!g_utf8_validate(preference->description, -1, NULL)) {
g_error("Description for preference %s.%s isn't valid UTF-8.", name_prefix, preference->name);
ws_error("Description for preference %s.%s isn't valid UTF-8.", name_prefix, preference->name);
}
}
@ -4521,7 +4523,7 @@ read_prefs_file(const char *pf_path, FILE *pf,
* If the pref has a trailing comma, eliminate it.
*/
cur_val->str[cur_val->len-1] = '\0';
g_warning ("%s line %d: trailing comma in \"%s\" %s", pf_path, pline, cur_var->str, hint);
ws_warning("%s line %d: trailing comma in \"%s\" %s", pf_path, pline, cur_var->str, hint);
}
}
/* Call the routine to set the preference; it will parse
@ -4537,12 +4539,12 @@ read_prefs_file(const char *pf_path, FILE *pf,
break;
case PREFS_SET_SYNTAX_ERR:
g_warning ("Syntax error in preference \"%s\" at line %d of\n%s %s",
ws_warning("Syntax error in preference \"%s\" at line %d of\n%s %s",
cur_var->str, pline, pf_path, hint);
break;
case PREFS_SET_NO_SUCH_PREF:
g_warning ("No such preference \"%s\" at line %d of\n%s %s",
ws_warning("No such preference \"%s\" at line %d of\n%s %s",
cur_var->str, pline, pf_path, hint);
prefs.unknown_prefs = TRUE;
break;
@ -4559,13 +4561,13 @@ read_prefs_file(const char *pf_path, FILE *pf,
* in the console window so that the
* user can make an informed choice.
*/
g_warning ("Obsolete preference \"%s\" at line %d of\n%s %s",
ws_warning("Obsolete preference \"%s\" at line %d of\n%s %s",
cur_var->str, pline, pf_path, hint);
prefs.unknown_prefs = TRUE;
break;
}
} else {
g_warning ("Incomplete preference at line %d: of\n%s %s", pline, pf_path, hint);
ws_warning("Incomplete preference at line %d: of\n%s %s", pline, pf_path, hint);
}
}
state = IN_VAR;
@ -4578,7 +4580,7 @@ read_prefs_file(const char *pf_path, FILE *pf,
} else if (got_c == '#') {
state = IN_SKIP;
} else {
g_warning ("Malformed preference at line %d of\n%s %s", fline, pf_path, hint);
ws_warning("Malformed preference at line %d of\n%s %s", fline, pf_path, hint);
}
break;
case IN_VAR:
@ -4623,12 +4625,12 @@ read_prefs_file(const char *pf_path, FILE *pf,
break;
case PREFS_SET_SYNTAX_ERR:
g_warning ("Syntax error in preference %s at line %d of\n%s %s",
ws_warning("Syntax error in preference %s at line %d of\n%s %s",
cur_var->str, pline, pf_path, hint);
break;
case PREFS_SET_NO_SUCH_PREF:
g_warning ("No such preference \"%s\" at line %d of\n%s %s",
ws_warning("No such preference \"%s\" at line %d of\n%s %s",
cur_var->str, pline, pf_path, hint);
prefs.unknown_prefs = TRUE;
break;
@ -4638,7 +4640,7 @@ read_prefs_file(const char *pf_path, FILE *pf,
break;
}
} else {
g_warning("Incomplete preference at line %d of\n%s %s",
ws_warning("Incomplete preference at line %d of\n%s %s",
pline, pf_path, hint);
}
}
@ -5291,16 +5293,16 @@ deprecated_port_pref(gchar *pref_name, const gchar *value)
for (i = 0; i < G_N_ELEMENTS(port_prefs); i++) {
module = prefs_find_module(port_prefs[i].module_name);
if (!module) {
g_warning("Deprecated ports pref check - module '%s' not found", port_prefs[i].module_name);
ws_warning("Deprecated ports pref check - module '%s' not found", port_prefs[i].module_name);
continue;
}
pref = prefs_find_preference(module, port_prefs[i].table_name);
if (!pref) {
g_warning("Deprecated ports pref '%s.%s' not found", module->name, port_prefs[i].table_name);
ws_warning("Deprecated ports pref '%s.%s' not found", module->name, port_prefs[i].table_name);
continue;
}
if (pref->type != PREF_DECODE_AS_UINT && pref->type != PREF_DECODE_AS_RANGE) {
g_warning("Deprecated ports pref '%s.%s' has wrong type: %#x (%s)", module->name, port_prefs[i].table_name, pref->type, prefs_pref_type_name(pref));
ws_warning("Deprecated ports pref '%s.%s' has wrong type: %#x (%s)", module->name, port_prefs[i].table_name, pref->type, prefs_pref_type_name(pref));
}
}
}
@ -5358,7 +5360,7 @@ deprecated_port_pref(gchar *pref_name, const gchar *value)
break;
default:
g_error("The dissector table %s (%s) is not an integer type - are you using a buggy plugin?", port_range_prefs[i].table_name, get_dissector_table_ui_name(port_range_prefs[i].table_name));
ws_error("The dissector table %s (%s) is not an integer type - are you using a buggy plugin?", port_range_prefs[i].table_name, get_dissector_table_ui_name(port_range_prefs[i].table_name));
g_assert_not_reached();
}
@ -5568,7 +5570,7 @@ set_pref(gchar *pref_name, const gchar *value, void *private_data _U_,
}
}
if (module) {
g_warning ("Preference \"%s.%s\" has been converted to \"%s.%s\"\n"
ws_warning("Preference \"%s.%s\" has been converted to \"%s.%s\"\n"
"Save your preferences to make this change permanent.",
pref_name, dotp+1, module->name, dotp+1);
prefs.unknown_prefs = TRUE;
@ -6671,7 +6673,7 @@ write_prefs(char **pf_path_return)
char *err = NULL;
prefs.filter_expressions_old = FALSE;
if (!uat_save(uat_get_table_by_name("Display expressions"), &err)) {
g_warning("Unable to save Display expressions: %s", err);
ws_warning("Unable to save Display expressions: %s", err);
g_free(err);
}
}

@ -9,6 +9,7 @@
*/
#include "config.h"
#define WS_LOG_DOMAIN LOG_DOMAIN_EPAN
#include <stdio.h>
#include <string.h>
@ -21,6 +22,7 @@
#include <wsutil/sign_ext.h>
#include <wsutil/utf8_entities.h>
#include <wsutil/json_dumper.h>
#include <wsutil/wslog.h>
#include <ftypes/ftypes-int.h>
@ -109,7 +111,7 @@ struct ptvcursor {
if (PTREE_DATA(tree)->count > prefs.gui_max_tree_items) { \
free_block; \
if (wireshark_abort_on_too_many_items) \
g_error("Adding %s would put more than %d items in the tree -- possible infinite loop (max number of items can be increased in advanced preferences)", \
ws_error("Adding %s would put more than %d items in the tree -- possible infinite loop (max number of items can be increased in advanced preferences)", \
hfinfo->abbrev, prefs.gui_max_tree_items); \
/* Let the exception handler add items to the tree */ \
PTREE_DATA(tree)->count = 0; \
@ -182,7 +184,7 @@ struct ptvcursor {
so only report if different... */ \
if ((start_values[m].value == current->value) && \
(strcmp(start_values[m].strptr, current->strptr) != 0)) { \
g_warning("Field '%s' (%s) has a conflicting entry in its" \
ws_warning("Field '%s' (%s) has a conflicting entry in its" \
" value_string: %" modifier "u is at indices %u (%s) and %u (%s)", \
hfinfo->name, hfinfo->abbrev, \
current->value, m, start_values[m].strptr, n, current->strptr); \
@ -325,7 +327,7 @@ static void register_type_length_mismatch(void);
static int proto_number_string_decoding_error = -1;
static expert_field ei_number_string_decoding_failed_error = EI_INIT;
static expert_field ei_number_string_decoding_erange_error = EI_INIT;
static void register_number_string_decoding_error(void);
static void register_number_string_decodinws_error(void);
/* Handle string errors expert info */
static int proto_string_errors = -1;
@ -388,7 +390,7 @@ static GHashTable* prefixes = NULL;
#define PROTO_REGISTRAR_GET_NTH(hfindex, hfinfo) \
if((guint)hfindex >= gpa_hfinfo.len && wireshark_abort_on_dissector_bug) \
g_error("Unregistered hf! index=%d", hfindex); \
ws_error("Unregistered hf! index=%d", hfindex); \
DISSECTOR_ASSERT_HINT((guint)hfindex < gpa_hfinfo.len, "Unregistered hf!"); \
DISSECTOR_ASSERT_HINT(gpa_hfinfo.hfi[hfindex] != NULL, "Unregistered hf!"); \
hfinfo = gpa_hfinfo.hfi[hfindex];
@ -455,7 +457,7 @@ proto_register_plugin(const proto_plugin *plug)
void
proto_register_plugin(const proto_plugin *plug _U_)
{
g_warning("proto_register_plugin: built without support for binary plugins");
ws_warning("proto_register_plugin: built without support for binary plugins");
}
#endif /* HAVE_PLUGINS */
@ -514,7 +516,7 @@ proto_init(GSList *register_all_plugin_protocols_list,
/* Register the pseudo-protocols used for exceptions. */
register_show_exception();
register_type_length_mismatch();
register_number_string_decoding_error();
register_number_string_decodinws_error();
register_string_errors();
/* Have each built-in dissector register its protocols, fields,
@ -7327,7 +7329,7 @@ check_valid_filter_name_or_fail(const char *filter_name)
}
if (found_invalid) {
g_error("Protocol filter name \"%s\" has one or more invalid characters."
ws_error("Protocol filter name \"%s\" has one or more invalid characters."
" Allowed are lower characters, digits, '-', '_' and non-repeating '.'."
" This might be caused by an inappropriate plugin or a development error.", filter_name);
}
@ -7350,19 +7352,19 @@ proto_register_protocol(const char *name, const char *short_name,
if (g_hash_table_lookup(proto_names, name)) {
/* g_error will terminate the program */
g_error("Duplicate protocol name \"%s\"!"
ws_error("Duplicate protocol name \"%s\"!"
" This might be caused by an inappropriate plugin or a development error.", name);
}
if (g_hash_table_lookup(proto_short_names, short_name)) {
g_error("Duplicate protocol short_name \"%s\"!"
ws_error("Duplicate protocol short_name \"%s\"!"
" This might be caused by an inappropriate plugin or a development error.", short_name);
}
check_valid_filter_name_or_fail(filter_name);
if (g_hash_table_lookup(proto_filter_names, filter_name)) {
g_error("Duplicate protocol filter_name \"%s\"!"
ws_error("Duplicate protocol filter_name \"%s\"!"
" This might be caused by an inappropriate plugin or a development error.", filter_name);
}
@ -7414,11 +7416,11 @@ proto_register_protocol_in_name_only(const char *name, const char *short_name, c
* Just register it in a list and make a hf_ field from it
*/
if ((field_type != FT_PROTOCOL) && (field_type != FT_BYTES)) {
g_error("Pino \"%s\" must be of type FT_PROTOCOL or FT_BYTES.", name);
ws_error("Pino \"%s\" must be of type FT_PROTOCOL or FT_BYTES.", name);
}
if (parent_proto < 0) {
g_error("Must have a valid parent protocol for helper protocol \"%s\"!"
ws_error("Must have a valid parent protocol for helper protocol \"%s\"!"
" This might be caused by an inappropriate plugin or a development error.", name);
}
@ -8221,16 +8223,16 @@ tmp_fld_check_assert(header_field_info *hfinfo)
if (!hfinfo->name || !hfinfo->name[0]) {
if (hfinfo->abbrev)
/* Try to identify the field */
g_error("Field (abbrev='%s') does not have a name\n",
ws_error("Field (abbrev='%s') does not have a name\n",
hfinfo->abbrev);
else
/* Hum, no luck */
g_error("Field does not have a name (nor an abbreviation)\n");
ws_error("Field does not have a name (nor an abbreviation)\n");
}
/* fields with an empty string for an abbreviation aren't filterable */
if (!hfinfo->abbrev || !hfinfo->abbrev[0])
g_error("Field '%s' does not have an abbreviation\n", hfinfo->name);
ws_error("Field '%s' does not have an abbreviation\n", hfinfo->name);
/* These types of fields are allowed to have value_strings,
* true_false_strings or a protocol_t struct
@ -8272,7 +8274,7 @@ tmp_fld_check_assert(header_field_info *hfinfo)
//fallthrough
default:
g_error("Field '%s' (%s) has a 'strings' value but is of type %s"
ws_error("Field '%s' (%s) has a 'strings' value but is of type %s"
" (which is not allowed to have strings)\n",
hfinfo->name, hfinfo->abbrev, ftype_name(hfinfo->type));
}
@ -8318,7 +8320,7 @@ tmp_fld_check_assert(header_field_info *hfinfo)
const true_false_string *tfs = (const true_false_string*)hfinfo->strings;
if (tfs) {
if (strcmp(tfs->false_string, tfs->true_string) == 0) {
g_warning("Field '%s' (%s) has identical true and false strings (\"%s\", \"%s\")",
ws_warning("Field '%s' (%s) has identical true and false strings (\"%s\", \"%s\")",
hfinfo->name, hfinfo->abbrev,
tfs->false_string, tfs->true_string);
}
@ -8332,7 +8334,7 @@ tmp_fld_check_assert(header_field_info *hfinfo)
do {
if (this_it->value_max < this_it->value_min) {
g_warning("value_range_string error: %s (%s) entry for \"%s\" - max(%u 0x%x) is less than min(%u 0x%x)",
ws_warning("value_range_string error: %s (%s) entry for \"%s\" - max(%u 0x%x) is less than min(%u 0x%x)",
hfinfo->name, hfinfo->abbrev,
this_it->strptr,
this_it->value_max, this_it->value_max,
@ -8344,7 +8346,7 @@ tmp_fld_check_assert(header_field_info *hfinfo)
for (const range_string *prev_it=rs; prev_it < this_it; ++prev_it) {
/* Not OK if this one is completely hidden by an earlier one! */
if ((prev_it->value_min <= this_it->value_min) && (prev_it->value_max >= this_it->value_max)) {
g_warning("value_range_string error: %s (%s) hidden by earlier entry "
ws_warning("value_range_string error: %s (%s) hidden by earlier entry "
"(prev=\"%s\": %u 0x%x -> %u 0x%x) (this=\"%s\": %u 0x%x -> %u 0x%x)",
hfinfo->name, hfinfo->abbrev,
prev_it->strptr, prev_it->value_min, prev_it->value_min,
@ -8378,7 +8380,7 @@ tmp_fld_check_assert(header_field_info *hfinfo)
break;
case BASE_NONE:
if (hfinfo->strings == NULL)
g_error("Field '%s' (%s) is an integral value (%s)"
ws_error("Field '%s' (%s) is an integral value (%s)"
" but is being displayed as BASE_NONE but"
" without a strings conversion",
hfinfo->name, hfinfo->abbrev,
@ -8386,14 +8388,14 @@ tmp_fld_check_assert(header_field_info *hfinfo)
break;
default:
tmp_str = val_to_str_wmem(NULL, hfinfo->display, hf_display, "(Unknown: 0x%x)");
g_error("Field '%s' (%s) is a character value (%s)"
ws_error("Field '%s' (%s) is a character value (%s)"
" but is being displayed as %s\n",
hfinfo->name, hfinfo->abbrev,
ftype_name(hfinfo->type), tmp_str);
wmem_free(NULL, tmp_str);
}
if (hfinfo->display & BASE_UNIT_STRING) {
g_error("Field '%s' (%s) is a character value (%s) but has a unit string\n",
ws_error("Field '%s' (%s) is a character value (%s) but has a unit string\n",
hfinfo->name, hfinfo->abbrev,
ftype_name(hfinfo->type));
}
@ -8417,7 +8419,7 @@ tmp_fld_check_assert(header_field_info *hfinfo)
case BASE_DEC_HEX:
case BASE_HEX_DEC:
tmp_str = val_to_str_wmem(NULL, hfinfo->display, hf_display, "(Bit count: %d)");
g_error("Field '%s' (%s) is signed (%s) but is being displayed unsigned (%s)\n",
ws_error("Field '%s' (%s) is signed (%s) but is being displayed unsigned (%s)\n",
hfinfo->name, hfinfo->abbrev,
ftype_name(hfinfo->type), tmp_str);
wmem_free(NULL, tmp_str);
@ -8434,17 +8436,17 @@ tmp_fld_check_assert(header_field_info *hfinfo)
if (IS_BASE_PORT(hfinfo->display)) {
tmp_str = val_to_str_wmem(NULL, hfinfo->display, hf_display, "(Unknown: 0x%x)");
if (hfinfo->type != FT_UINT16) {
g_error("Field '%s' (%s) has 'display' value %s but it can only be used with FT_UINT16, not %s\n",
ws_error("Field '%s' (%s) has 'display' value %s but it can only be used with FT_UINT16, not %s\n",
hfinfo->name, hfinfo->abbrev,
tmp_str, ftype_name(hfinfo->type));
}
if (hfinfo->strings != NULL) {
g_error("Field '%s' (%s) is an %s (%s) but has a strings value\n",
ws_error("Field '%s' (%s) is an %s (%s) but has a strings value\n",
hfinfo->name, hfinfo->abbrev,
ftype_name(hfinfo->type), tmp_str);
}
if (hfinfo->bitmask != 0) {
g_error("Field '%s' (%s) is an %s (%s) but has a bitmask\n",
ws_error("Field '%s' (%s) is an %s (%s) but has a bitmask\n",
hfinfo->name, hfinfo->abbrev,
ftype_name(hfinfo->type), tmp_str);
}
@ -8455,17 +8457,17 @@ tmp_fld_check_assert(header_field_info *hfinfo)
if (hfinfo->display == BASE_OUI) {
tmp_str = val_to_str_wmem(NULL, hfinfo->display, hf_display, "(Unknown: 0x%x)");
if (hfinfo->type != FT_UINT24) {
g_error("Field '%s' (%s) has 'display' value %s but it can only be used with FT_UINT24, not %s\n",
ws_error("Field '%s' (%s) has 'display' value %s but it can only be used with FT_UINT24, not %s\n",
hfinfo->name, hfinfo->abbrev,
tmp_str, ftype_name(hfinfo->type));
}
if (hfinfo->strings != NULL) {
g_error("Field '%s' (%s) is an %s (%s) but has a strings value\n",
ws_error("Field '%s' (%s) is an %s (%s) but has a strings value\n",
hfinfo->name, hfinfo->abbrev,
ftype_name(hfinfo->type), tmp_str);
}
if (hfinfo->bitmask != 0) {
g_error("Field '%s' (%s) is an %s (%s) but has a bitmask\n",
ws_error("Field '%s' (%s) is an %s (%s) but has a bitmask\n",
hfinfo->name, hfinfo->abbrev,
ftype_name(hfinfo->type), tmp_str);
}
@ -8493,14 +8495,14 @@ tmp_fld_check_assert(header_field_info *hfinfo)
break;
case BASE_NONE:
if (hfinfo->strings == NULL) {
g_error("Field '%s' (%s) is an integral value (%s)"
ws_error("Field '%s' (%s) is an integral value (%s)"
" but is being displayed as BASE_NONE but"
" without a strings conversion",
hfinfo->name, hfinfo->abbrev,
ftype_name(hfinfo->type));
}
if (hfinfo->display & BASE_SPECIAL_VALS) {
g_error("Field '%s' (%s) is an integral value (%s)"
ws_error("Field '%s' (%s) is an integral value (%s)"
" that is being displayed as BASE_NONE but"
" with BASE_SPECIAL_VALS",
hfinfo->name, hfinfo->abbrev,
@ -8510,7 +8512,7 @@ tmp_fld_check_assert(header_field_info *hfinfo)
default:
tmp_str = val_to_str_wmem(NULL, hfinfo->display, hf_display, "(Unknown: 0x%x)");
g_error("Field '%s' (%s) is an integral value (%s)"
ws_error("Field '%s' (%s) is an integral value (%s)"
" but is being displayed as %s\n",
hfinfo->name, hfinfo->abbrev,
ftype_name(hfinfo->type), tmp_str);
@ -8531,17 +8533,17 @@ tmp_fld_check_assert(header_field_info *hfinfo)
break;
default:
tmp_str = val_to_str_wmem(NULL, hfinfo->display, hf_display, "(Bit count: %d)");
g_error("Field '%s' (%s) is an byte array but is being displayed as %s instead of BASE_NONE, SEP_DOT, SEP_DASH, SEP_COLON, or SEP_SPACE\n",
ws_error("Field '%s' (%s) is an byte array but is being displayed as %s instead of BASE_NONE, SEP_DOT, SEP_DASH, SEP_COLON, or SEP_SPACE\n",
hfinfo->name, hfinfo->abbrev, tmp_str);
wmem_free(NULL, tmp_str);
}
if (hfinfo->bitmask != 0)
g_error("Field '%s' (%s) is an %s but has a bitmask\n",
ws_error("Field '%s' (%s) is an %s but has a bitmask\n",
hfinfo->name, hfinfo->abbrev,
ftype_name(hfinfo->type));
//allowed to support string if its a protocol (for pinos)
if ((hfinfo->strings != NULL) && (!(hfinfo->display & BASE_PROTOCOL_INFO)))
g_error("Field '%s' (%s) is an %s but has a strings value\n",
ws_error("Field '%s' (%s) is an %s but has a strings value\n",
hfinfo->name, hfinfo->abbrev,
ftype_name(hfinfo->type));
break;
@ -8550,13 +8552,13 @@ tmp_fld_check_assert(header_field_info *hfinfo)
case FT_FRAMENUM:
if (hfinfo->display != BASE_NONE) {
tmp_str = val_to_str_wmem(NULL, hfinfo->display, hf_display, "(Bit count: %d)");
g_error("Field '%s' (%s) is an %s but is being displayed as %s instead of BASE_NONE\n",
ws_error("Field '%s' (%s) is an %s but is being displayed as %s instead of BASE_NONE\n",
hfinfo->name, hfinfo->abbrev,
ftype_name(hfinfo->type), tmp_str);
wmem_free(NULL, tmp_str);
}
if (hfinfo->bitmask != 0)
g_error("Field '%s' (%s) is an %s but has a bitmask\n",
ws_error("Field '%s' (%s) is an %s but has a bitmask\n",
hfinfo->name, hfinfo->abbrev,
ftype_name(hfinfo->type));
break;
@ -8570,12 +8572,12 @@ tmp_fld_check_assert(header_field_info *hfinfo)
hfinfo->display == ABSOLUTE_TIME_NTP_UTC ||
hfinfo->display == ABSOLUTE_TIME_DOY_UTC)) {
tmp_str = val_to_str_wmem(NULL, hfinfo->display, hf_display, "(Bit count: %d)");
g_error("Field '%s' (%s) is a %s but is being displayed as %s instead of as a time\n",
ws_error("Field '%s' (%s) is a %s but is being displayed as %s instead of as a time\n",
hfinfo->name, hfinfo->abbrev, ftype_name(hfinfo->type), tmp_str);
wmem_free(NULL, tmp_str);
}
if (hfinfo->bitmask != 0)
g_error("Field '%s' (%s) is an %s but has a bitmask\n",
ws_error("Field '%s' (%s) is an %s but has a bitmask\n",
hfinfo->name, hfinfo->abbrev,
ftype_name(hfinfo->type));
break;
@ -8592,7 +8594,7 @@ tmp_fld_check_assert(header_field_info *hfinfo)
default:
tmp_str = val_to_str_wmem(NULL, hfinfo->display, hf_display, "(Unknown: 0x%x)");
g_error("Field '%s' (%s) is an string value (%s)"
ws_error("Field '%s' (%s) is an string value (%s)"
" but is being displayed as %s\n",
hfinfo->name, hfinfo->abbrev,
ftype_name(hfinfo->type), tmp_str);
@ -8600,11 +8602,11 @@ tmp_fld_check_assert(header_field_info *hfinfo)
}
if (hfinfo->bitmask != 0)
g_error("Field '%s' (%s) is an %s but has a bitmask\n",
ws_error("Field '%s' (%s) is an %s but has a bitmask\n",
hfinfo->name, hfinfo->abbrev,
ftype_name(hfinfo->type));
if (hfinfo->strings != NULL)
g_error("Field '%s' (%s) is an %s but has a strings value\n",
ws_error("Field '%s' (%s) is an %s but has a strings value\n",
hfinfo->name, hfinfo->abbrev,
ftype_name(hfinfo->type));
break;
@ -8617,7 +8619,7 @@ tmp_fld_check_assert(header_field_info *hfinfo)
default:
tmp_str = val_to_str_wmem(NULL, hfinfo->display, hf_display, "(Unknown: 0x%x)");
g_error("Field '%s' (%s) is an IPv4 value (%s)"
ws_error("Field '%s' (%s) is an IPv4 value (%s)"
" but is being displayed as %s\n",
hfinfo->name, hfinfo->abbrev,
ftype_name(hfinfo->type), tmp_str);
@ -8629,36 +8631,36 @@ tmp_fld_check_assert(header_field_info *hfinfo)
case FT_DOUBLE:
if (FIELD_DISPLAY(hfinfo->display) != BASE_NONE) {
tmp_str = val_to_str_wmem(NULL, hfinfo->display, hf_display, "(Bit count: %d)");
g_error("Field '%s' (%s) is an %s but is being displayed as %s instead of BASE_NONE\n",
ws_error("Field '%s' (%s) is an %s but is being displayed as %s instead of BASE_NONE\n",
hfinfo->name, hfinfo->abbrev,
ftype_name(hfinfo->type),
tmp_str);
wmem_free(NULL, tmp_str);
}
if (hfinfo->bitmask != 0)
g_error("Field '%s' (%s) is an %s but has a bitmask\n",
ws_error("Field '%s' (%s) is an %s but has a bitmask\n",
hfinfo->name, hfinfo->abbrev,
ftype_name(hfinfo->type));
if ((hfinfo->strings != NULL) && (!(hfinfo->display & BASE_UNIT_STRING)))
g_error("Field '%s' (%s) is an %s but has a strings value\n",
ws_error("Field '%s' (%s) is an %s but has a strings value\n",
hfinfo->name, hfinfo->abbrev,
ftype_name(hfinfo->type));
break;
default:
if (hfinfo->display != BASE_NONE) {
tmp_str = val_to_str_wmem(NULL, hfinfo->display, hf_display, "(Bit count: %d)");
g_error("Field '%s' (%s) is an %s but is being displayed as %s instead of BASE_NONE\n",
ws_error("Field '%s' (%s) is an %s but is being displayed as %s instead of BASE_NONE\n",
hfinfo->name, hfinfo->abbrev,
ftype_name(hfinfo->type),
tmp_str);
wmem_free(NULL, tmp_str);
}
if (hfinfo->bitmask != 0)
g_error("Field '%s' (%s) is an %s but has a bitmask\n",
ws_error("Field '%s' (%s) is an %s but has a bitmask\n",
hfinfo->name, hfinfo->abbrev,
ftype_name(hfinfo->type));
if (hfinfo->strings != NULL)
g_error("Field '%s' (%s) is an %s but has a strings value\n",
ws_error("Field '%s' (%s) is an %s but has a strings value\n",
hfinfo->name, hfinfo->abbrev,
ftype_name(hfinfo->type));
break;
@ -8735,7 +8737,7 @@ register_type_length_mismatch(void)
}
static void
register_number_string_decoding_error(void)
register_number_string_decodinws_error(void)
{
static ei_register_info ei[] = {
{ &ei_number_string_decoding_failed_error,
@ -8807,7 +8809,7 @@ proto_register_field_init(header_field_info *hfinfo, const int parent)
gpa_hfinfo.allocated_len += 1000;
gpa_hfinfo.hfi = (header_field_info **)g_realloc(gpa_hfinfo.hfi,
sizeof(header_field_info *)*gpa_hfinfo.allocated_len);
/*g_warning("gpa_hfinfo.allocated_len %u", gpa_hfinfo.allocated_len);*/
/*ws_warning("gpa_hfinfo.allocated_len %u", gpa_hfinfo.allocated_len);*/
}
}
gpa_hfinfo.hfi[gpa_hfinfo.len] = hfinfo;
@ -8869,7 +8871,7 @@ proto_register_field_init(header_field_info *hfinfo, const int parent)
#ifdef ENABLE_CHECK_FILTER
while (same_name_hfinfo) {
if (_ftype_common(hfinfo->type) != _ftype_common(same_name_hfinfo->type))
g_warning("'%s' exists multiple times with incompatible types: %s and %s", hfinfo->abbrev, ftype_name(hfinfo->type), ftype_name(same_name_hfinfo->type));
ws_warning("'%s' exists multiple times with incompatible types: %s and %s", hfinfo->abbrev, ftype_name(hfinfo->type), ftype_name(same_name_hfinfo->type));
same_name_hfinfo = same_name_hfinfo->same_name_next;
}
#endif
@ -8914,7 +8916,7 @@ proto_register_subtree_array(gint * const *indices, const int num_indices)
for (i = 0; i < num_indices; i++, ptr++, num_tree_types++) {
if (**ptr != -1) {
/* g_error will terminate the program */
g_error("register_subtree_array: subtree item type (ett_...) not -1 !"
ws_error("register_subtree_array: subtree item type (ett_...) not -1 !"
" This is a development error:"
" Either the subtree item type has already been assigned or"
" was not initialized to -1.");
@ -10780,7 +10782,7 @@ proto_registrar_dump_values(void)
if (hfinfo->display & BASE_VAL64_STRING) {
val64_string_ext *vse_p = (val64_string_ext *)hfinfo->strings;
if (!val64_string_ext_validate(vse_p)) {
g_warning("Invalid val64_string_ext ptr for: %s", hfinfo->abbrev);
ws_warning("Invalid val64_string_ext ptr for: %s", hfinfo->abbrev);
continue;
}
try_val64_to_str_ext(0, vse_p); /* "prime" the extended val64_string */
@ -10792,7 +10794,7 @@ proto_registrar_dump_values(void)
} else {
value_string_ext *vse_p = (value_string_ext *)hfinfo->strings;
if (!value_string_ext_validate(vse_p)) {
g_warning("Invalid value_string_ext ptr for: %s", hfinfo->abbrev);
ws_warning("Invalid value_string_ext ptr for: %s", hfinfo->abbrev);
continue;
}
try_val_to_str_ext(0, vse_p); /* "prime" the extended value_string */

@ -16,6 +16,7 @@
#include "secrets.h"
#include <wiretap/wtap.h>
#include <wsutil/glib-compat.h>
#include <wsutil/wslog.h>
#include <string.h>
#ifdef HAVE_LIBGNUTLS
@ -138,7 +139,7 @@ rsa_privkey_add(const cert_key_id_t *key_id, gnutls_privkey_t pkey)
void *ht_key = g_memdup2(key_id->key_id, sizeof(cert_key_id_t));
const guint32 *dw = (const guint32 *)key_id->key_id;
g_hash_table_insert(rsa_privkeys, ht_key, pkey);</