core: use MM-specific logging methods always instead of the generic GLib ones

This commit is contained in:
Aleksander Morgado
2016-08-15 13:14:47 +02:00
parent 2306a466c8
commit 7fb366c41a
9 changed files with 65 additions and 45 deletions
+4 -4
View File
@@ -1008,7 +1008,7 @@ syscfg_test_ready (MMBroadbandModemHuawei *self,
combinations,
(GDestroyNotify)g_array_unref);
} else {
g_debug ("Error while checking ^SYSCFG format: %s", error->message);
mm_dbg ("Error while checking ^SYSCFG format: %s", error->message);
/* If SIM-PIN error, don't mark as feature unsupported; we'll retry later */
if (!g_error_matches (error,
MM_MOBILE_EQUIPMENT_ERROR,
@@ -1066,7 +1066,7 @@ syscfgex_test_ready (MMBroadbandModemHuawei *self,
/* If SIM-PIN error, don't mark as feature unsupported; we'll retry later */
if (error) {
g_debug ("Error while checking ^SYSCFGEX format: %s", error->message);
mm_dbg ("Error while checking ^SYSCFGEX format: %s", error->message);
if (g_error_matches (error,
MM_MOBILE_EQUIPMENT_ERROR,
MM_MOBILE_EQUIPMENT_ERROR_SIM_PIN)) {
@@ -1127,7 +1127,7 @@ prefmode_test_ready (MMBroadbandModemHuawei *self,
combinations,
(GDestroyNotify)g_array_unref);
} else {
g_debug ("Error while checking ^PREFMODE format: %s", error->message);
mm_dbg ("Error while checking ^PREFMODE format: %s", error->message);
/* If SIM-PIN error, don't mark as feature unsupported; we'll retry later */
if (!g_error_matches (error,
MM_MOBILE_EQUIPMENT_ERROR,
@@ -2163,7 +2163,7 @@ peek_port_at_for_data (MMBroadbandModemHuawei *self,
g_warn_if_fail (mm_port_get_subsys (port) == MM_PORT_SUBSYS_NET);
net_port_parent_path = mm_port_get_parent_path (port);
if (!net_port_parent_path) {
g_warning ("(%s) no parent path for net port", mm_port_get_device (port));
mm_warn ("(%s) no parent path for net port", mm_port_get_device (port));
return NULL;
}
+6 -5
View File
@@ -25,6 +25,7 @@
#define _LIBMM_INSIDE_MM
#include <libmm-glib.h>
#include "mm-log.h"
#include "mm-modem-helpers.h"
#include "mm-modem-helpers-mbm.h"
@@ -175,7 +176,7 @@ add_supported_mode (guint32 *mask,
g_assert (mask);
if (mode >= 32)
g_warning ("Ignored unexpected mode in +CFUN match: %d", mode);
mm_warn ("Ignored unexpected mode in +CFUN match: %d", mode);
else
*mask |= (1 << mode);
}
@@ -236,18 +237,18 @@ mm_mbm_parse_cfun_test (const gchar *response,
last_str = separator + 1;
if (!mm_get_uint_from_str (first_str, &first))
g_warning ("Couldn't match range start: '%s'", first_str);
mm_warn ("Couldn't match range start: '%s'", first_str);
else if (!mm_get_uint_from_str (last_str, &last))
g_warning ("Couldn't match range stop: '%s'", last_str);
mm_warn ("Couldn't match range stop: '%s'", last_str);
else if (first >= last)
g_warning ("Couldn't match range: wrong first '%s' and last '%s' items", first_str, last_str);
mm_warn ("Couldn't match range: wrong first '%s' and last '%s' items", first_str, last_str);
else {
for (mode = first; mode <= last; mode++)
add_supported_mode (&mask, mode);
}
} else {
if (!mm_get_uint_from_str (supported_modes[i], &mode))
g_warning ("Couldn't match mode: '%s'", supported_modes[i]);
mm_warn ("Couldn't match mode: '%s'", supported_modes[i]);
else
add_supported_mode (&mask, mode);
}