diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2013-09-11 17:00:43 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2013-09-11 17:00:43 +0200 |
commit | 0ff4da71e37e449eb4ade106d78cf6b753af671d (patch) | |
tree | ba114f4c90c8e00638f40a867ae6356c590e16f6 | |
parent | 4f451cf76737acd66d7ba3842a5fcf483723d0be (diff) | |
download | ModemManager-0ff4da71e37e449eb4ade106d78cf6b753af671d.tar.gz |
error-helpers: don't warn when unknown errors are found
Just add the messages with debug level, so that they don't get reported at
syslog. Having this kind of warnings in syslog is not useful, specially because
we wouldn't know which was the specific command that issued the warning. Errors
due to critical issues will anyway be reported in syslog in some way or another.
-rw-r--r-- | src/mm-error-helpers.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mm-error-helpers.c b/src/mm-error-helpers.c index 6e63b1b1c..e922cbbfd 100644 --- a/src/mm-error-helpers.c +++ b/src/mm-error-helpers.c @@ -50,7 +50,7 @@ mm_connection_error_for_code (MMConnectionError code) break; default: - g_warning ("Invalid connection error code: %u", code); + g_debug ("Invalid connection error code: %u", code); /* uhm... make something up (yes, ok, lie!). */ code = MM_CONNECTION_ERROR_NO_CARRIER; msg = "No carrier"; @@ -127,7 +127,7 @@ mm_mobile_equipment_error_for_code (MMMobileEquipmentError code) } /* Not found? Then, default */ - g_warning ("Invalid mobile equipment error code: %u", (guint)code); + g_debug ("Invalid mobile equipment error code: %u", (guint)code); return g_error_new (MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_UNKNOWN, "Unknown error"); @@ -163,8 +163,8 @@ mm_mobile_equipment_error_for_string (const gchar *str) /* Not found? Then, default */ if (!msg) { - g_warning ("Invalid mobile equipment error string: '%s' (%s)", - str, buf); + g_debug ("Invalid mobile equipment error string: '%s' (%s)", + str, buf); code = MM_MOBILE_EQUIPMENT_ERROR_UNKNOWN; msg = "Unknown error"; } @@ -215,7 +215,7 @@ mm_message_error_for_code (MMMessageError code) } /* Not found? Then, default */ - g_warning ("Invalid message error code: %u", (guint)code); + g_debug ("Invalid message error code: %u", (guint)code); return g_error_new (MM_MESSAGE_ERROR, MM_MESSAGE_ERROR_UNKNOWN, "Unknown error"); @@ -251,8 +251,8 @@ mm_message_error_for_string (const gchar *str) /* Not found? Then, default */ if (!msg) { - g_warning ("Invalid message error string: '%s' (%s)", - str, buf); + g_debug ("Invalid message error string: '%s' (%s)", + str, buf); code = MM_MESSAGE_ERROR_UNKNOWN; msg = "Unknown error"; } |