diff options
-rw-r--r-- | plugins/telit/mm-broadband-modem-mbim-telit.c | 19 | ||||
-rw-r--r-- | plugins/telit/mm-broadband-modem-telit.c | 60 | ||||
-rw-r--r-- | plugins/telit/mm-common-telit.c | 39 | ||||
-rw-r--r-- | plugins/telit/mm-modem-helpers-telit.c | 19 | ||||
-rw-r--r-- | plugins/telit/mm-modem-helpers-telit.h | 2 | ||||
-rw-r--r-- | plugins/telit/mm-plugin-telit.c | 6 | ||||
-rw-r--r-- | plugins/telit/mm-shared-telit.c | 6 | ||||
-rw-r--r-- | plugins/telit/tests/test-mm-modem-helpers-telit.c | 2 |
8 files changed, 81 insertions, 72 deletions
diff --git a/plugins/telit/mm-broadband-modem-mbim-telit.c b/plugins/telit/mm-broadband-modem-mbim-telit.c index 248461b5..1a2c3866 100644 --- a/plugins/telit/mm-broadband-modem-mbim-telit.c +++ b/plugins/telit/mm-broadband-modem-mbim-telit.c @@ -22,7 +22,7 @@ #include <ctype.h> #include "ModemManager.h" -#include "mm-log.h" +#include "mm-log-object.h" #include "mm-modem-helpers.h" #include "mm-iface-modem.h" #include "mm-base-modem-at.h" @@ -30,8 +30,8 @@ #include "mm-modem-helpers-telit.h" #include "mm-shared-telit.h" -static void iface_modem_init (MMIfaceModem *iface); -static void shared_telit_init (MMSharedTelit *iface); +static void iface_modem_init (MMIfaceModem *iface); +static void shared_telit_init (MMSharedTelit *iface); G_DEFINE_TYPE_EXTENDED (MMBroadbandModemMbimTelit, mm_broadband_modem_mbim_telit, MM_TYPE_BROADBAND_MODEM_MBIM, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init) @@ -65,7 +65,7 @@ load_supported_modes_ready (MMIfaceModem *self, response = mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, &error); if (error) { - mm_dbg ("Generic query of supported 3GPP networks with WS46=? failed: '%s'", error->message); + g_prefix_error (&error, "ceneric query of supported 3GPP networks with WS46=? failed: "); g_task_return_error (task, error); g_object_unref (task); return; @@ -73,23 +73,22 @@ load_supported_modes_ready (MMIfaceModem *self, modes = mm_3gpp_parse_ws46_test_response (response, &error); if (!modes) { - mm_dbg ("Parsing WS46=? response failed: '%s'", error->message); + g_prefix_error (&error, "parsing WS46=? response failed: "); g_task_return_error (task, error); g_object_unref (task); return; } for (i = 0; i < modes->len; i++) { - MMModemMode mode; - gchar *str; + MMModemMode mode; + g_autofree gchar *str = NULL; mode = g_array_index (modes, MMModemMode, i); modes_mask |= mode; str = mm_modem_mode_build_string_from_mask (mode); - mm_dbg ("Device allows (3GPP) mode combination: %s", str); - g_free (str); + mm_obj_dbg (self, "device allows (3GPP) mode combination: %s", str); } g_array_unref (modes); @@ -117,8 +116,6 @@ load_supported_modes (MMIfaceModem *self, { GTask *task; - mm_dbg ("loading Telit mbim supported modes..."); - task = g_task_new (self, NULL, callback, user_data); mm_base_modem_at_command (MM_BASE_MODEM (self), "+WS46=?", diff --git a/plugins/telit/mm-broadband-modem-telit.c b/plugins/telit/mm-broadband-modem-telit.c index a240bb1c..48ae4de1 100644 --- a/plugins/telit/mm-broadband-modem-telit.c +++ b/plugins/telit/mm-broadband-modem-telit.c @@ -24,7 +24,7 @@ #include <ctype.h> #include "ModemManager.h" -#include "mm-log.h" +#include "mm-log-object.h" #include "mm-errors-types.h" #include "mm-modem-helpers.h" #include "mm-base-modem-at.h" @@ -182,7 +182,7 @@ gps_enabled_ready (MMBaseModem *self, ctx = g_task_get_task_data (task); if (!mm_base_modem_at_command_finish (self, res, &error)) { - mm_warn ("telit: couldn't power up GNSS controller: '%s'", error->message); + g_prefix_error (&error, "couldn't power up GNSS controller: "); g_task_return_error (task, error); g_object_unref (task); return; @@ -197,7 +197,9 @@ gps_enabled_ready (MMBaseModem *self, task); return; } - mm_info("telit: GNSS controller is powered up"); + + mm_obj_dbg (self, "GNSS controller is powered up"); + /* Only use the GPS port in NMEA/RAW setups */ if (ctx->source & (MM_MODEM_LOCATION_SOURCE_GPS_NMEA | MM_MODEM_LOCATION_SOURCE_GPS_RAW)) { @@ -355,7 +357,7 @@ gpsp_test_ready (MMIfaceModemLocation *self, sources = GPOINTER_TO_UINT (g_task_get_task_data (task)); mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, &error); if (error) { - mm_dbg ("telit: GPS controller not supported: %s", error->message); + mm_obj_dbg (self, "GPS controller not supported: %s", error->message); g_clear_error (&error); } else if (mm_base_modem_get_port_gps (MM_BASE_MODEM (self))) sources |= (MM_MODEM_LOCATION_SOURCE_GPS_NMEA | @@ -473,12 +475,12 @@ telit_qss_unsolicited_handler (MMPortSerialAt *port, if (self->priv->csim_lock_state >= CSIM_LOCK_STATE_LOCK_REQUESTED) { if (prev_qss_status > QSS_STATUS_SIM_REMOVED && cur_qss_status == QSS_STATUS_SIM_REMOVED) { - mm_dbg ("QSS handler: #QSS=0 after +CSIM=1 -> CSIM locked!"); + mm_obj_dbg (self, "QSS handler: #QSS=0 after +CSIM=1: CSIM locked!"); self->priv->csim_lock_state = CSIM_LOCK_STATE_LOCKED; } if (prev_qss_status == QSS_STATUS_SIM_REMOVED && cur_qss_status != QSS_STATUS_SIM_REMOVED) { - mm_dbg ("QSS handler: #QSS>=1 after +CSIM=0 -> CSIM unlocked!"); + mm_obj_dbg (self, "QSS handler: #QSS>=1 after +CSIM=0: CSIM unlocked!"); self->priv->csim_lock_state = CSIM_LOCK_STATE_UNLOCKED; if (self->priv->csim_lock_timeout_id) { @@ -493,18 +495,18 @@ telit_qss_unsolicited_handler (MMPortSerialAt *port, } if (cur_qss_status != prev_qss_status) - mm_dbg ("QSS handler: status changed '%s -> %s'", - mm_telit_qss_status_get_string (prev_qss_status), - mm_telit_qss_status_get_string (cur_qss_status)); + mm_obj_dbg (self, "QSS handler: status changed %s -> %s", + mm_telit_qss_status_get_string (prev_qss_status), + mm_telit_qss_status_get_string (cur_qss_status)); if (self->priv->parse_qss == FALSE) { - mm_dbg ("QSS: message ignored"); + mm_obj_dbg (self, "QSS handler: message ignored"); return; } if ((prev_qss_status == QSS_STATUS_SIM_REMOVED && cur_qss_status != QSS_STATUS_SIM_REMOVED) || (prev_qss_status > QSS_STATUS_SIM_REMOVED && cur_qss_status == QSS_STATUS_SIM_REMOVED)) { - mm_info ("QSS handler: SIM swap detected"); + mm_obj_info (self, "QSS handler: SIM swap detected"); mm_broadband_modem_update_sim_hot_swap_detected (MM_BROADBAND_MODEM (self)); } } @@ -549,7 +551,7 @@ telit_qss_enable_ready (MMBaseModem *self, g_assert_not_reached (); if (!mm_base_modem_at_command_full_finish (self, res, error)) { - mm_warn ("QSS: error enabling unsolicited on port %s: %s", mm_port_get_device (MM_PORT (port)), (*error)->message); + mm_obj_warn (self, "QSS: error enabling unsolicited on port %s: %s", mm_port_get_device (MM_PORT (port)), (*error)->message); goto next_step; } @@ -584,19 +586,19 @@ telit_qss_query_ready (MMBaseModem *_self, response = mm_base_modem_at_command_finish (_self, res, &error); if (error) { - mm_warn ("Could not get \"#QSS?\" reply: %s", error->message); + mm_obj_warn (self, "could not get \"#QSS?\" reply: %s", error->message); g_error_free (error); goto next_step; } qss_status = mm_telit_parse_qss_query (response, &error); if (error) { - mm_warn ("QSS query parse error: %s", error->message); + mm_obj_warn (self, "QSS query parse error: %s", error->message); g_error_free (error); goto next_step; } - mm_info ("QSS: current status is '%s'", mm_telit_qss_status_get_string (qss_status)); + mm_obj_dbg (self, "QSS: current status is '%s'", mm_telit_qss_status_get_string (qss_status)); self->priv->qss_status = qss_status; next_step: @@ -754,7 +756,7 @@ csim_unlock_ready (MMBaseModem *_self, MM_MOBILE_EQUIPMENT_ERROR_NOT_SUPPORTED)) { self->priv->csim_lock_support = FEATURE_NOT_SUPPORTED; } - mm_warn ("Couldn't unlock SIM card: %s", error->message); + mm_obj_warn (self, "couldn't unlock SIM card: %s", error->message); g_error_free (error); } @@ -776,7 +778,7 @@ parent_load_unlock_retries_ready (MMIfaceModem *self, ctx = g_task_get_task_data (task); if (!(ctx->retries = iface_modem_parent->load_unlock_retries_finish (self, res, &error))) { - mm_warn ("couldn't load unlock retries with generic logic: %s", error->message); + mm_obj_warn (self, "couldn't load unlock retries with generic logic: %s", error->message); g_error_free (error); } @@ -803,7 +805,7 @@ csim_lock_ready (MMBaseModem *_self, MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_NOT_SUPPORTED)) { self->priv->csim_lock_support = FEATURE_NOT_SUPPORTED; - mm_warn ("Couldn't lock SIM card: %s. Continuing without CSIM lock.", error->message); + mm_obj_warn (self, "couldn't lock SIM card: %s; continuing without CSIM lock", error->message); g_error_free (error); } else { g_prefix_error (&error, "Couldn't lock SIM card: "); @@ -853,8 +855,8 @@ handle_csim_locking (GTask *task, } break; case FEATURE_NOT_SUPPORTED: - mm_dbg ("CSIM lock not supported by this modem. Skipping %s command", - is_lock ? "lock" : "unlock"); + mm_obj_dbg (self, "CSIM lock not supported by this modem; skipping %s command", + is_lock ? "lock" : "unlock"); ctx->step++; load_unlock_retries_step (task); break; @@ -884,9 +886,8 @@ pending_csim_unlock_complete (MMBroadbandModemTelit *self) static gboolean csim_unlock_periodic_check (MMBroadbandModemTelit *self) { - if (self->priv->csim_lock_state != CSIM_LOCK_STATE_UNLOCKED) { - mm_warn ("CSIM is still locked after %d seconds. Trying to continue anyway", CSIM_UNLOCK_MAX_TIMEOUT); - } + if (self->priv->csim_lock_state != CSIM_LOCK_STATE_UNLOCKED) + mm_obj_warn (self, "CSIM is still locked after %d seconds; trying to continue anyway", CSIM_UNLOCK_MAX_TIMEOUT); self->priv->csim_lock_timeout_id = 0; pending_csim_unlock_complete (self); @@ -922,7 +923,7 @@ load_unlock_retries_step (GTask *task) case LOAD_UNLOCK_RETRIES_STEP_LAST: self->priv->csim_lock_task = task; if (self->priv->csim_lock_state == CSIM_LOCK_STATE_LOCKED) { - mm_dbg ("CSIM is locked. Waiting for #QSS=1"); + mm_obj_dbg (self, "CSIM is locked, waiting for #QSS=1"); self->priv->csim_lock_timeout_id = g_timeout_add_seconds (CSIM_UNLOCK_MAX_TIMEOUT, (GSourceFunc) csim_unlock_periodic_check, g_object_ref(self)); @@ -977,7 +978,7 @@ modem_after_power_up (MMIfaceModem *self, task = g_task_new (self, NULL, callback, user_data); - mm_dbg ("Stop ignoring #QSS"); + mm_obj_dbg (self, "stop ignoring #QSS"); modem->priv->parse_qss = TRUE; g_task_return_boolean (task, TRUE); @@ -1003,12 +1004,12 @@ telit_modem_power_down_ready (MMBaseModem *self, GError *error = NULL; if (mm_base_modem_at_command_finish (self, res, &error)) { - mm_dbg ("Ignore #QSS unsolicited during power down/low"); + mm_obj_dbg (self, "sgnore #QSS unsolicited during power down/low"); MM_BROADBAND_MODEM_TELIT (self)->priv->parse_qss = FALSE; } if (error) { - mm_err ("modem power down: %s", error->message); + mm_obj_warn (self, "failed modem power down: %s", error->message); g_clear_error (&error); } @@ -1194,7 +1195,6 @@ load_access_technologies (MMIfaceModem *self, GAsyncReadyCallback callback, gpointer user_data) { - mm_dbg ("loading access technology (Telit)..."); mm_base_modem_at_sequence ( MM_BASE_MODEM (self), access_tech_commands, @@ -1280,7 +1280,7 @@ cind_set_ready (MMBaseModem *self, GError *error = NULL; if (!mm_base_modem_at_command_finish (self, res, &error)) { - mm_warn ("Couldn't enable custom +CIND settings: %s", error->message); + mm_obj_warn (self, "couldn't enable custom +CIND settings: %s", error->message); g_error_free (error); } @@ -1296,7 +1296,7 @@ parent_enable_unsolicited_events_ready (MMIfaceModem3gpp *self, GError *error = NULL; if (!iface_modem_3gpp_parent->enable_unsolicited_events_finish (self, res, &error)) { - mm_warn ("Couldn't enable parent 3GPP unsolicited events: %s", error->message); + mm_obj_warn (self, "couldn't enable parent 3GPP unsolicited events: %s", error->message); g_error_free (error); } diff --git a/plugins/telit/mm-common-telit.c b/plugins/telit/mm-common-telit.c index 3cdbd7fd..0493fd54 100644 --- a/plugins/telit/mm-common-telit.c +++ b/plugins/telit/mm-common-telit.c @@ -16,7 +16,7 @@ #include <string.h> #include "mm-common-telit.h" -#include "mm-log.h" +#include "mm-log-object.h" /*****************************************************************************/ @@ -55,19 +55,19 @@ telit_grab_port (MMPlugin *self, usbif = mm_kernel_device_get_property_as_int_hex (port, "ID_USB_INTERFACE_NUM"); if (usbif == GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (device), TAG_TELIT_MODEM_PORT))) { - mm_dbg ("telit: AT port '%s/%s' flagged as primary", - mm_port_probe_get_port_subsys (probe), - mm_port_probe_get_port_name (probe)); + mm_obj_dbg (self, "AT port '%s/%s' flagged as primary", + mm_port_probe_get_port_subsys (probe), + mm_port_probe_get_port_name (probe)); pflags = MM_PORT_SERIAL_AT_FLAG_PRIMARY; } else if (usbif == GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (device), TAG_TELIT_AUX_PORT))) { - mm_dbg ("telit: AT port '%s/%s' flagged as secondary", - mm_port_probe_get_port_subsys (probe), - mm_port_probe_get_port_name (probe)); + mm_obj_dbg (self, "AT port '%s/%s' flagged as secondary", + mm_port_probe_get_port_subsys (probe), + mm_port_probe_get_port_name (probe)); pflags = MM_PORT_SERIAL_AT_FLAG_SECONDARY; } else if (usbif == GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (device), TAG_TELIT_NMEA_PORT))) { - mm_dbg ("telit: port '%s/%s' flagged as NMEA", - mm_port_probe_get_port_subsys (probe), - mm_port_probe_get_port_name (probe)); + mm_obj_dbg (self, "port '%s/%s' flagged as NMEA", + mm_port_probe_get_port_subsys (probe), + mm_port_probe_get_port_name (probe)); ptype = MM_PORT_TYPE_GPS; } else ptype = MM_PORT_TYPE_IGNORED; @@ -101,7 +101,8 @@ telit_custom_init_finish (MMPortProbe *probe, static void telit_custom_init_step (GTask *task); static gboolean -cache_port_mode (MMDevice *device, +cache_port_mode (MMPortProbe *probe, + MMDevice *device, const gchar *reply) { GRegex *r = NULL; @@ -119,7 +120,7 @@ cache_port_mode (MMDevice *device, goto out; if (!mm_get_uint_from_match_info (match_info, 2, &portcfg_current)) { - mm_dbg ("telit: unrecognized #PORTCFG <active> value"); + mm_obj_dbg (probe, "unrecognized #PORTCFG <active> value"); goto out; } @@ -168,8 +169,8 @@ out: g_match_info_free (match_info); g_regex_unref (r); if (error != NULL) { - mm_dbg ("telit: error while matching: %s", error->message); - g_error_free (error); + mm_obj_dbg (probe, "error while matching #PORTCFG: %s", error->message); + g_error_free (error); } return ret; } @@ -189,8 +190,7 @@ getportcfg_ready (MMPortSerialAt *port, response = mm_port_serial_at_command_finish (port, res, &error); if (error) { - mm_dbg ("telit: couldn't get port mode: '%s'", - error->message); + mm_obj_dbg (probe, "couldn't get telit port mode: '%s'", error->message); /* If ERROR or COMMAND NOT SUPPORT occur then do not retry the * command. @@ -206,8 +206,8 @@ getportcfg_ready (MMPortSerialAt *port, /* Results are cached in the parent device object */ if (g_object_get_data (G_OBJECT (device), TAG_GETPORTCFG_SUPPORTED) == NULL) { - mm_dbg ("telit: retrieving port mode layout"); - if (cache_port_mode (device, response)) { + mm_obj_dbg (probe, "retrieving telit port mode layout"); + if (cache_port_mode (probe, device, response)) { g_object_set_data (G_OBJECT (device), TAG_GETPORTCFG_SUPPORTED, GUINT_TO_POINTER (TRUE)); ctx->getportcfg_done = TRUE; } @@ -242,8 +242,7 @@ telit_custom_init_step (GTask *task) /* If cancelled, end */ if (g_cancellable_is_cancelled (g_task_get_cancellable (task))) { - mm_dbg ("telit: no need to keep on running custom init in (%s)", - mm_port_get_device (MM_PORT (ctx->port))); + mm_obj_dbg (probe, "no need to keep on running custom init"); goto out; } diff --git a/plugins/telit/mm-modem-helpers-telit.c b/plugins/telit/mm-modem-helpers-telit.c index 07d46b8d..f77afeea 100644 --- a/plugins/telit/mm-modem-helpers-telit.c +++ b/plugins/telit/mm-modem-helpers-telit.c @@ -23,7 +23,7 @@ #define _LIBMM_INSIDE_MMCLI #include <libmm-glib.h> -#include "mm-log.h" +#include "mm-log-object.h" #include "mm-modem-helpers.h" #include "mm-modem-helpers-telit.h" @@ -375,6 +375,7 @@ mm_telit_build_bnd_request (GArray *bands_array, static gboolean telit_get_2g_mm_bands (GMatchInfo *match_info, + gpointer log_object, GArray **bands, GError **error) { @@ -406,7 +407,7 @@ telit_get_2g_mm_bands (GMatchInfo *match_info, *bands = g_array_append_val (*bands, j); } } else - mm_dbg ("unhandled telit 2G band value configuration: %u", value); + mm_obj_dbg (log_object, "unhandled telit 2G band value configuration: %u", value); } out: @@ -422,8 +423,9 @@ out: static gboolean telit_get_3g_mm_bands (GMatchInfo *match_info, - GArray **bands, + gpointer log_object, gboolean modem_alternate_3g_bands, + GArray **bands, GError **error) { GError *inner_error = NULL; @@ -472,7 +474,7 @@ telit_get_3g_mm_bands (GMatchInfo *match_info, *bands = g_array_append_val (*bands, j); } } else - mm_dbg ("unhandled telit 3G band value configuration: %u", value); + mm_obj_dbg (log_object, "unhandled telit 3G band value configuration: %u", value); } out: @@ -542,6 +544,7 @@ common_parse_bnd_response (const gchar *response, gboolean modem_is_4g, gboolean modem_alternate_3g_bands, LoadBandsType load_type, + gpointer log_object, GError **error) { GError *inner_error = NULL; @@ -571,10 +574,10 @@ common_parse_bnd_response (const gchar *response, bands = g_array_new (TRUE, TRUE, sizeof (MMModemBand)); - if (modem_is_2g && !telit_get_2g_mm_bands (match_info, &bands, &inner_error)) + if (modem_is_2g && !telit_get_2g_mm_bands (match_info, log_object, &bands, &inner_error)) goto out; - if (modem_is_3g && !telit_get_3g_mm_bands (match_info, &bands, modem_alternate_3g_bands, &inner_error)) + if (modem_is_3g && !telit_get_3g_mm_bands (match_info, log_object, modem_alternate_3g_bands, &bands, &inner_error)) goto out; if (modem_is_4g && !telit_get_4g_mm_bands (match_info, &bands, &inner_error)) @@ -599,12 +602,14 @@ mm_telit_parse_bnd_query_response (const gchar *response, gboolean modem_is_3g, gboolean modem_is_4g, gboolean modem_alternate_3g_bands, + gpointer log_object, GError **error) { return common_parse_bnd_response (response, modem_is_2g, modem_is_3g, modem_is_4g, modem_alternate_3g_bands, LOAD_BANDS_TYPE_CURRENT, + log_object, error); } @@ -614,12 +619,14 @@ mm_telit_parse_bnd_test_response (const gchar *response, gboolean modem_is_3g, gboolean modem_is_4g, gboolean modem_alternate_3g_bands, + gpointer log_object, GError **error) { return common_parse_bnd_response (response, modem_is_2g, modem_is_3g, modem_is_4g, modem_alternate_3g_bands, LOAD_BANDS_TYPE_SUPPORTED, + log_object, error); } diff --git a/plugins/telit/mm-modem-helpers-telit.h b/plugins/telit/mm-modem-helpers-telit.h index 491e8fa6..0c52bb7b 100644 --- a/plugins/telit/mm-modem-helpers-telit.h +++ b/plugins/telit/mm-modem-helpers-telit.h @@ -25,12 +25,14 @@ GArray *mm_telit_parse_bnd_query_response (const gchar *response, gboolean modem_is_3g, gboolean modem_is_4g, gboolean modem_alternate_3g_bands, + gpointer log_object, GError **error); GArray *mm_telit_parse_bnd_test_response (const gchar *response, gboolean modem_is_2g, gboolean modem_is_3g, gboolean modem_is_4g, gboolean modem_alternate_3g_bands, + gpointer log_object, GError **error); gchar *mm_telit_build_bnd_request (GArray *bands_array, gboolean modem_is_2g, diff --git a/plugins/telit/mm-plugin-telit.c b/plugins/telit/mm-plugin-telit.c index 093975a9..926ce977 100644 --- a/plugins/telit/mm-plugin-telit.c +++ b/plugins/telit/mm-plugin-telit.c @@ -22,7 +22,7 @@ #include <libmm-glib.h> #include "mm-port-enums-types.h" -#include "mm-log.h" +#include "mm-log-object.h" #include "mm-modem-helpers.h" #include "mm-plugin-telit.h" #include "mm-common-telit.h" @@ -55,7 +55,7 @@ create_modem (MMPlugin *self, { #if defined WITH_QMI if (mm_port_probe_list_has_qmi_port (probes)) { - mm_dbg ("QMI-powered Telit modem found..."); + mm_obj_dbg (self, "QMI-powered Telit modem found..."); return MM_BASE_MODEM (mm_broadband_modem_qmi_new (uid, drivers, mm_plugin_get_name (self), @@ -66,7 +66,7 @@ create_modem (MMPlugin *self, #if defined WITH_MBIM if (mm_port_probe_list_has_mbim_port (probes)) { - mm_dbg ("MBIM-powered Telit modem found..."); + mm_obj_dbg (self, "MBIM-powered Telit modem found..."); return MM_BASE_MODEM (mm_broadband_modem_mbim_telit_new (uid, drivers, mm_plugin_get_name (self), diff --git a/plugins/telit/mm-shared-telit.c b/plugins/telit/mm-shared-telit.c index f1eb0518..9a5aa838 100644 --- a/plugins/telit/mm-shared-telit.c +++ b/plugins/telit/mm-shared-telit.c @@ -23,7 +23,7 @@ #define _LIBMM_INSIDE_MM #include <libmm-glib.h> -#include "mm-log.h" +#include "mm-log-object.h" #include "mm-iface-modem.h" #include "mm-iface-modem-location.h" #include "mm-base-modem.h" @@ -63,7 +63,7 @@ initialize_alternate_3g_band (MMSharedTelit *self, /* Lookup for the tag specifying that we're using the alternate 3G band mapping */ priv->alternate_3g_bands = mm_kernel_device_get_global_property_as_boolean (port, "ID_MM_TELIT_BND_ALTERNATE"); if (priv->alternate_3g_bands) - mm_dbg ("Telit modem using alternate 3G band mask setup"); + mm_obj_dbg (self, "telit modem using alternate 3G band mask setup"); } static Private * @@ -197,6 +197,7 @@ mm_shared_telit_load_supported_bands_ready (MMBaseModem *self, mm_iface_modem_is_3g (MM_IFACE_MODEM (self)), mm_iface_modem_is_4g (MM_IFACE_MODEM (self)), priv->alternate_3g_bands, + self, &error); if (!bands) g_task_return_error (task, error); @@ -256,6 +257,7 @@ mm_shared_telit_load_current_bands_ready (MMBaseModem *self, mm_iface_modem_is_3g (MM_IFACE_MODEM (self)), mm_iface_modem_is_4g (MM_IFACE_MODEM (self)), priv->alternate_3g_bands, + self, &error); if (!bands) g_task_return_error (task, error); diff --git a/plugins/telit/tests/test-mm-modem-helpers-telit.c b/plugins/telit/tests/test-mm-modem-helpers-telit.c index 7561dac2..b6083816 100644 --- a/plugins/telit/tests/test-mm-modem-helpers-telit.c +++ b/plugins/telit/tests/test-mm-modem-helpers-telit.c @@ -170,6 +170,7 @@ test_parse_supported_bands_response (void) supported_band_mapping_tests[i].modem_is_3g, supported_band_mapping_tests[i].modem_is_4g, supported_band_mapping_tests[i].modem_alternate_3g_bands, + NULL, &error); g_assert_no_error (error); g_assert (bands); @@ -278,6 +279,7 @@ test_parse_current_bands_response (void) current_band_mapping_tests[i].modem_is_3g, current_band_mapping_tests[i].modem_is_4g, current_band_mapping_tests[i].modem_alternate_3g_bands, + NULL, &error); g_assert_no_error (error); g_assert (bands); |