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 /ui | |
parent | 4c4bb915c866f234e527ae0a5fc296ef3f732a0e (diff) |
Replace g_log() calls with ws_log()
Diffstat (limited to 'ui')
-rw-r--r-- | ui/capture.c | 6 | ||||
-rw-r--r-- | ui/cli/tap-httpstat.c | 4 | ||||
-rw-r--r-- | ui/cli/tap-rtspstat.c | 4 | ||||
-rw-r--r-- | ui/cli/tap-sipstat.c | 4 | ||||
-rw-r--r-- | ui/filter_files.c | 14 | ||||
-rw-r--r-- | ui/preference_utils.c | 2 | ||||
-rw-r--r-- | ui/rtp_stream.h | 2 | ||||
-rw-r--r-- | ui/voip_calls.h | 2 |
8 files changed, 23 insertions, 15 deletions
diff --git a/ui/capture.c b/ui/capture.c index 5cf1eb6129..44e3b02202 100644 --- a/ui/capture.c +++ b/ui/capture.c @@ -438,7 +438,7 @@ capture_input_new_file(capture_session *cap_session, gchar *new_file) if (!cap_session->wtap) { err_msg = g_strdup_printf(cf_open_error_message(err, err_info), new_file); - g_warning("capture_input_new_file: %d (%s)", err, err_msg); + ws_warning("capture_input_new_file: %d (%s)", err, err_msg); g_free(err_msg); return FALSE; } @@ -481,7 +481,7 @@ capture_info_new_packets(int to_read, wtap *wth, info_data_t* cap_info) cap_info->ui.new_packets = to_read; - /*g_warning("new packets: %u", to_read);*/ + /*ws_warning("new packets: %u", to_read);*/ wtap_rec_init(&rec); ws_buffer_init(&buf, 1514); @@ -497,7 +497,7 @@ capture_info_new_packets(int to_read, wtap *wth, info_data_t* cap_info) rec.rec_header.packet_header.caplen, pseudo_header); - /*g_warning("new packet");*/ + /*ws_warning("new packet");*/ to_read--; } } diff --git a/ui/cli/tap-httpstat.c b/ui/cli/tap-httpstat.c index d4eb53b832..e1c9bf9a37 100644 --- a/ui/cli/tap-httpstat.c +++ b/ui/cli/tap-httpstat.c @@ -22,6 +22,8 @@ #include <epan/stat_tap_ui.h> #include <epan/dissectors/packet-http.h> +#include <wsutil/wslog.h> + #include <ui/cmdarg_err.h> void register_tap_listener_httpstat(void); @@ -82,7 +84,7 @@ static void http_draw_hash_responses(gint * key _U_, http_response_code_t *data, char *format) { if (data == NULL) { - g_warning("No data available, key=%d\n", *key); + ws_warning("No data available, key=%d\n", *key); exit(EXIT_FAILURE); } if (data->packets == 0) diff --git a/ui/cli/tap-rtspstat.c b/ui/cli/tap-rtspstat.c index f35f6ee0ce..258b852eb0 100644 --- a/ui/cli/tap-rtspstat.c +++ b/ui/cli/tap-rtspstat.c @@ -25,6 +25,8 @@ #include <epan/stat_tap_ui.h> #include <epan/dissectors/packet-rtsp.h> +#include <wsutil/wslog.h> + #include <ui/cmdarg_err.h> void register_tap_listener_rtspstat(void); @@ -85,7 +87,7 @@ static void rtsp_draw_hash_responses( gpointer* key _U_ , rtsp_response_code_t *data, char * format) { if (data == NULL) { - g_warning("No data available, key=%d\n", GPOINTER_TO_INT(key)); + ws_warning("No data available, key=%d\n", GPOINTER_TO_INT(key)); exit(EXIT_FAILURE); } if (data->packets == 0) diff --git a/ui/cli/tap-sipstat.c b/ui/cli/tap-sipstat.c index a5cd8c69ce..a2bf79910c 100644 --- a/ui/cli/tap-sipstat.c +++ b/ui/cli/tap-sipstat.c @@ -24,6 +24,8 @@ #include <epan/value_string.h> #include <epan/dissectors/packet-sip.h> +#include <wsutil/wslog.h> + #include <ui/cmdarg_err.h> void register_tap_listener_sipstat(void); @@ -98,7 +100,7 @@ static void sip_draw_hash_responses( gint *key _U_ , sip_response_code_t *data, char *format) { if (data == NULL) { - g_warning("C'est quoi ce borderl key=%d\n", *key); + ws_warning("C'est quoi ce borderl key=%d\n", *key); exit(EXIT_FAILURE); } if (data->packets == 0) diff --git a/ui/filter_files.c b/ui/filter_files.c index 1609f011fb..e3647ac8b4 100644 --- a/ui/filter_files.c +++ b/ui/filter_files.c @@ -9,6 +9,7 @@ */ #include <config.h> +#define WS_LOG_DOMAIN LOG_DOMAIN_MAIN #include <stdio.h> #include <string.h> @@ -19,6 +20,7 @@ #include <wsutil/file_util.h> #include <wsutil/filesystem.h> #include <wsutil/report_message.h> +#include <wsutil/wslog.h> #include "ui/filter_files.h" @@ -239,7 +241,7 @@ read_filter_list(filter_list_type_t list_type) /* "c" is the first non-white-space character. If it's not a quote, it's an error. */ if (c != '"') { - g_warning("'%s' line %d doesn't have a quoted filter name.", ff_path, + ws_warning("'%s' line %d doesn't have a quoted filter name.", ff_path, line); while (c != '\n') c = getc(ff); /* skip to the end of the line */ @@ -281,7 +283,7 @@ read_filter_list(filter_list_type_t list_type) if (c == EOF) { if (!ferror(ff)) { /* 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 */ @@ -289,7 +291,7 @@ read_filter_list(filter_list_type_t list_type) if (c != '"') { /* No newline seen before end-of-line */ - g_warning("'%s' line %d doesn't have a closing quote.", ff_path, + ws_warning("'%s' line %d doesn't have a closing quote.", ff_path, line); continue; } @@ -300,7 +302,7 @@ read_filter_list(filter_list_type_t list_type) if (c == EOF) { if (!ferror(ff)) { /* 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 */ @@ -308,7 +310,7 @@ read_filter_list(filter_list_type_t list_type) if (c == '\n') { /* No filter expression */ - g_warning("'%s' line %d doesn't have a filter expression.", ff_path, + ws_warning("'%s' line %d doesn't have a filter expression.", ff_path, line); continue; } @@ -335,7 +337,7 @@ read_filter_list(filter_list_type_t list_type) if (c == EOF) { if (!ferror(ff)) { /* 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 */ diff --git a/ui/preference_utils.c b/ui/preference_utils.c index 4f83e9e959..936b14dadb 100644 --- a/ui/preference_utils.c +++ b/ui/preference_utils.c @@ -248,7 +248,7 @@ void save_migrated_uat(const char *uat_name, gboolean *old_pref) char *err = NULL; if (!uat_save(uat_get_table_by_name(uat_name), &err)) { - g_warning("Unable to save %s: %s", uat_name, err); + ws_warning("Unable to save %s: %s", uat_name, err); g_free(err); return; } diff --git a/ui/rtp_stream.h b/ui/rtp_stream.h index e5d71ce28e..ad9cf0008b 100644 --- a/ui/rtp_stream.h +++ b/ui/rtp_stream.h @@ -106,7 +106,7 @@ struct _rtpstream_tapinfo { #if 0 #define RTP_STREAM_DEBUG(...) { \ char *RTP_STREAM_DEBUG_MSG = g_strdup_printf(__VA_ARGS__); \ - g_warning("rtp_stream: %s:%d %s", G_STRFUNC, __LINE__, RTP_STREAM_DEBUG_MSG); \ + ws_warning("rtp_stream: %s:%d %s", G_STRFUNC, __LINE__, RTP_STREAM_DEBUG_MSG); \ g_free(RTP_STREAM_DEBUG_MSG); \ } #else diff --git a/ui/voip_calls.h b/ui/voip_calls.h index db5ef172a6..b1263b1695 100644 --- a/ui/voip_calls.h +++ b/ui/voip_calls.h @@ -223,7 +223,7 @@ typedef struct _voip_calls_tapinfo { #if 0 #define VOIP_CALLS_DEBUG(...) { \ char *VOIP_CALLS_DEBUG_MSG = g_strdup_printf(__VA_ARGS__); \ - g_warning("voip_calls: %s:%d %s", G_STRFUNC, __LINE__, VOIP_CALLS_DEBUG_MSG); \ + ws_warning("voip_calls: %s:%d %s", G_STRFUNC, __LINE__, VOIP_CALLS_DEBUG_MSG); \ g_free(VOIP_CALLS_DEBUG_MSG); \ } #else |