aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2020-04-08 08:00:03 +0200
committerAleksander Morgado <aleksander@aleksander.es>2020-04-08 16:35:10 +0200
commit9c9e531130e3a6cad4fcdf30c90d345a98cfe1b2 (patch)
tree69f0245543f1f488a1d93f25d6898468d3aa2ac1
parentab47b565731296ba76d18d17c0c2ccc9d029de52 (diff)
x22x: port to use object logging
-rw-r--r--plugins/x22x/mm-broadband-modem-x22x.c1
-rw-r--r--plugins/x22x/mm-plugin-x22x.c24
2 files changed, 14 insertions, 11 deletions
diff --git a/plugins/x22x/mm-broadband-modem-x22x.c b/plugins/x22x/mm-broadband-modem-x22x.c
index a86b7a57..dcd1addb 100644
--- a/plugins/x22x/mm-broadband-modem-x22x.c
+++ b/plugins/x22x/mm-broadband-modem-x22x.c
@@ -300,7 +300,6 @@ load_access_technologies (MMIfaceModem *self,
GAsyncReadyCallback callback,
gpointer user_data)
{
- mm_dbg ("loading access technology (x22x)...");
mm_base_modem_at_command (MM_BASE_MODEM (self),
"+SSND?",
3,
diff --git a/plugins/x22x/mm-plugin-x22x.c b/plugins/x22x/mm-plugin-x22x.c
index 795d30a7..4ec03a71 100644
--- a/plugins/x22x/mm-plugin-x22x.c
+++ b/plugins/x22x/mm-plugin-x22x.c
@@ -21,7 +21,7 @@
#define _LIBMM_INSIDE_MM
#include <libmm-glib.h>
-#include "mm-log.h"
+#include "mm-log-object.h"
#include "mm-modem-helpers.h"
#include "mm-plugin-x22x.h"
#include "mm-broadband-modem-x22x.h"
@@ -62,12 +62,15 @@ static void x22x_custom_init_step (GTask *task);
static void
gmr_ready (MMPortSerialAt *port,
- GAsyncResult *res,
- GTask *task)
+ GAsyncResult *res,
+ GTask *task)
{
+ MMPortProbe *probe;
const gchar *p;
const gchar *response;
- GError *error = NULL;
+ GError *error = NULL;
+
+ probe = g_task_get_source_object (task);
response = mm_port_serial_at_command_finish (port, res, &error);
if (error) {
@@ -90,7 +93,7 @@ gmr_ready (MMPortSerialAt *port,
MM_CORE_ERROR_UNSUPPORTED,
"Not supported with the X22X plugin");
} else {
- mm_dbg ("(X22X) device is supported by this plugin");
+ mm_obj_dbg (probe, "(X22X) device is supported by this plugin");
g_task_return_boolean (task, TRUE);
}
g_object_unref (task);
@@ -99,16 +102,17 @@ gmr_ready (MMPortSerialAt *port,
static void
x22x_custom_init_step (GTask *task)
{
+ MMPortProbe *probe;
X22xCustomInitContext *ctx;
- GCancellable *cancellable;
+ GCancellable *cancellable;
- ctx = g_task_get_task_data (task);
+ probe = g_task_get_source_object (task);
+ ctx = g_task_get_task_data (task);
cancellable = g_task_get_cancellable (task);
/* If cancelled, end */
if (g_cancellable_is_cancelled (cancellable)) {
- mm_dbg ("(X22X) no need to keep on running custom init in (%s)",
- mm_port_get_device (MM_PORT (ctx->port)));
+ mm_obj_dbg (probe, "(X22X) no need to keep on running custom init");
g_task_return_boolean (task, TRUE);
g_object_unref (task);
return;
@@ -190,7 +194,7 @@ create_modem (MMPlugin *self,
{
#if defined WITH_QMI
if (mm_port_probe_list_has_qmi_port (probes)) {
- mm_dbg ("QMI-powered X22X modem found...");
+ mm_obj_dbg (self, "QMI-powered X22X modem found...");
return MM_BASE_MODEM (mm_broadband_modem_qmi_new (uid,
drivers,
mm_plugin_get_name (self),