diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2021-06-15 00:06:02 +0100 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2021-06-16 12:50:27 +0000 |
commit | 39df3ae3c0ff12da5f5630b89a147b65588cc4c2 (patch) | |
tree | 280be0d508116a8fdb3d3a719f249497868a12c2 /wiretap | |
parent | 4c4bb915c866f234e527ae0a5fc296ef3f732a0e (diff) |
Replace g_log() calls with ws_log()
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/file_access.c | 22 | ||||
-rw-r--r-- | wiretap/lanalyzer.c | 6 | ||||
-rw-r--r-- | wiretap/log3gpp.c | 2 | ||||
-rw-r--r-- | wiretap/pcapng.c | 4 | ||||
-rw-r--r-- | wiretap/wtap.c | 2 |
5 files changed, 19 insertions, 17 deletions
diff --git a/wiretap/file_access.c b/wiretap/file_access.c index 8a7a920ca1..3ceecfeb52 100644 --- a/wiretap/file_access.c +++ b/wiretap/file_access.c @@ -7,6 +7,7 @@ */ #include "config.h" +#define WS_LOG_DOMAIN LOG_DOMAIN_WIRETAP #include <string.h> #include <stdlib.h> @@ -19,6 +20,7 @@ #include <wsutil/plugins.h> #endif #include <wsutil/ws_assert.h> +#include <wsutil/wslog.h> #include "wtap-int.h" #include "wtap_modules.h" @@ -510,13 +512,13 @@ void wtap_register_open_info(struct open_info *oi, const gboolean first_routine) { if (!oi || !oi->name) { - g_error("No open_info name given to register"); + ws_error("No open_info name given to register"); return; } /* verify name doesn't already exist */ if (wtap_has_open_info(oi->name)) { - g_error("Name given to register_open_info already exists"); + ws_error("Name given to register_open_info already exists"); return; } @@ -548,7 +550,7 @@ wtap_deregister_open_info(const gchar *name) guint i; if (!name) { - g_error("Missing open_info name to de-register"); + ws_error("Missing open_info name to de-register"); return; } @@ -561,7 +563,7 @@ wtap_deregister_open_info(const gchar *name) } } - g_error("deregister_open_info: name not found"); + ws_error("deregister_open_info: name not found"); } /* Determines if a open routine short name already exists @@ -572,7 +574,7 @@ wtap_has_open_info(const gchar *name) guint i; if (!name) { - g_error("No name given to wtap_has_open_info!"); + ws_error("No name given to wtap_has_open_info!"); return FALSE; } @@ -1315,7 +1317,7 @@ wtap_register_file_type_subtype(const struct file_type_subtype_info* fi) * Check for required fields (description and name). */ if (!fi || !fi->description || !fi->name) { - g_warning("no file type info"); + ws_warning("no file type info"); return -1; } @@ -1324,7 +1326,7 @@ wtap_register_file_type_subtype(const struct file_type_subtype_info* fi) * type/subtype supports. */ if (fi->num_supported_blocks == 0 || fi->supported_blocks == NULL) { - g_warning("no blocks supported by file type \"%s\"", fi->name); + ws_warning("no blocks supported by file type \"%s\"", fi->name); return -1; } @@ -1335,7 +1337,7 @@ wtap_register_file_type_subtype(const struct file_type_subtype_info* fi) /* * Yes. You don't get to replace an existing handler. */ - g_warning("file type \"%s\" is already registered", fi->name); + ws_warning("file type \"%s\" is already registered", fi->name); return -1; } @@ -1388,11 +1390,11 @@ wtap_deregister_file_type_subtype(const int subtype) struct file_type_subtype_info* finfo; if (subtype < 0 || subtype >= (int)file_type_subtype_table_arr->len) { - g_error("invalid file type to de-register"); + ws_error("invalid file type to de-register"); return; } if ((guint)subtype >= wtap_num_builtin_file_types_subtypes) { - g_error("built-in file types cannot be de-registered"); + ws_error("built-in file types cannot be de-registered"); return; } diff --git a/wiretap/lanalyzer.c b/wiretap/lanalyzer.c index 368b441cda..4f74b77078 100644 --- a/wiretap/lanalyzer.c +++ b/wiretap/lanalyzer.c @@ -355,7 +355,7 @@ wtap_open_return_val lanalyzer_open(wtap *wth, int *err, gchar **err_info) record_type = pletoh16(rec_header.record_type); record_length = pletoh16(rec_header.record_length); - /*g_message("Record 0x%04X Length %d", record_type, record_length);*/ + /*ws_message("Record 0x%04X Length %d", record_type, record_length);*/ switch (record_type) { /* Trace Summary Record */ case RT_Summary: @@ -378,7 +378,7 @@ wtap_open_return_val lanalyzer_open(wtap *wth, int *err, gchar **err_info) cr_day = summary[0]; cr_month = summary[1]; cr_year = pletoh16(&summary[2]); - /*g_message("Day %d Month %d Year %d (%04X)", cr_day, cr_month, + /*ws_message("Day %d Month %d Year %d (%04X)", cr_day, cr_month, cr_year, cr_year);*/ /* Get capture start time. I learned how to do @@ -392,7 +392,7 @@ wtap_open_return_val lanalyzer_open(wtap *wth, int *err, gchar **err_info) tm.tm_sec = 0; tm.tm_isdst = -1; start = mktime(&tm); - /*g_message("Day %d Month %d Year %d", tm.tm_mday, + /*ws_message("Day %d Month %d Year %d", tm.tm_mday, tm.tm_mon, tm.tm_year);*/ mxslc = pletoh16(&summary[30]); diff --git a/wiretap/log3gpp.c b/wiretap/log3gpp.c index fa8bb2cdc2..893538afb6 100644 --- a/wiretap/log3gpp.c +++ b/wiretap/log3gpp.c @@ -142,7 +142,7 @@ log3gpp_open(wtap *wth, int *err, gchar **err_info _U_) /********************************************************************/ /* First line needs to contain at least as many characters as magic */ - /*g_warning("Open file"); */ + /*ws_warning("Open file"); */ if (!read_new_line(wth->fh, &firstline_length, linebuff, sizeof linebuff, err, err_info)) { diff --git a/wiretap/pcapng.c b/wiretap/pcapng.c index 9d99d8a63d..d689f7f214 100644 --- a/wiretap/pcapng.c +++ b/wiretap/pcapng.c @@ -305,7 +305,7 @@ 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). */ - g_warning("Attempt to register plugin for block type 0x%08x not allowed", + ws_warning("Attempt to register plugin for block type 0x%08x not allowed", block_type); return; @@ -329,7 +329,7 @@ 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. */ - g_warning("Attempt to register plugin for reserved block type 0x%08x not allowed", + ws_warning("Attempt to register plugin for reserved block type 0x%08x not allowed", block_type); return; } diff --git a/wiretap/wtap.c b/wiretap/wtap.c index e37836adc8..ba45ee0822 100644 --- a/wiretap/wtap.c +++ b/wiretap/wtap.c @@ -40,7 +40,7 @@ wtap_register_plugin(const wtap_plugin *plug) void wtap_register_plugin(const wtap_plugin *plug _U_) { - g_warning("wtap_register_plugin: built without support for binary plugins"); + ws_warning("wtap_register_plugin: built without support for binary plugins"); } #endif /* HAVE_PLUGINS */ |