x22x: port to use object logging
This commit is contained in:
@@ -300,7 +300,6 @@ load_access_technologies (MMIfaceModem *self,
|
|||||||
GAsyncReadyCallback callback,
|
GAsyncReadyCallback callback,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
mm_dbg ("loading access technology (x22x)...");
|
|
||||||
mm_base_modem_at_command (MM_BASE_MODEM (self),
|
mm_base_modem_at_command (MM_BASE_MODEM (self),
|
||||||
"+SSND?",
|
"+SSND?",
|
||||||
3,
|
3,
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
#define _LIBMM_INSIDE_MM
|
#define _LIBMM_INSIDE_MM
|
||||||
#include <libmm-glib.h>
|
#include <libmm-glib.h>
|
||||||
|
|
||||||
#include "mm-log.h"
|
#include "mm-log-object.h"
|
||||||
#include "mm-modem-helpers.h"
|
#include "mm-modem-helpers.h"
|
||||||
#include "mm-plugin-x22x.h"
|
#include "mm-plugin-x22x.h"
|
||||||
#include "mm-broadband-modem-x22x.h"
|
#include "mm-broadband-modem-x22x.h"
|
||||||
@@ -65,10 +65,13 @@ gmr_ready (MMPortSerialAt *port,
|
|||||||
GAsyncResult *res,
|
GAsyncResult *res,
|
||||||
GTask *task)
|
GTask *task)
|
||||||
{
|
{
|
||||||
|
MMPortProbe *probe;
|
||||||
const gchar *p;
|
const gchar *p;
|
||||||
const gchar *response;
|
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);
|
response = mm_port_serial_at_command_finish (port, res, &error);
|
||||||
if (error) {
|
if (error) {
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
@@ -90,7 +93,7 @@ gmr_ready (MMPortSerialAt *port,
|
|||||||
MM_CORE_ERROR_UNSUPPORTED,
|
MM_CORE_ERROR_UNSUPPORTED,
|
||||||
"Not supported with the X22X plugin");
|
"Not supported with the X22X plugin");
|
||||||
} else {
|
} 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_task_return_boolean (task, TRUE);
|
||||||
}
|
}
|
||||||
g_object_unref (task);
|
g_object_unref (task);
|
||||||
@@ -99,16 +102,17 @@ gmr_ready (MMPortSerialAt *port,
|
|||||||
static void
|
static void
|
||||||
x22x_custom_init_step (GTask *task)
|
x22x_custom_init_step (GTask *task)
|
||||||
{
|
{
|
||||||
|
MMPortProbe *probe;
|
||||||
X22xCustomInitContext *ctx;
|
X22xCustomInitContext *ctx;
|
||||||
GCancellable *cancellable;
|
GCancellable *cancellable;
|
||||||
|
|
||||||
|
probe = g_task_get_source_object (task);
|
||||||
ctx = g_task_get_task_data (task);
|
ctx = g_task_get_task_data (task);
|
||||||
cancellable = g_task_get_cancellable (task);
|
cancellable = g_task_get_cancellable (task);
|
||||||
|
|
||||||
/* If cancelled, end */
|
/* If cancelled, end */
|
||||||
if (g_cancellable_is_cancelled (cancellable)) {
|
if (g_cancellable_is_cancelled (cancellable)) {
|
||||||
mm_dbg ("(X22X) no need to keep on running custom init in (%s)",
|
mm_obj_dbg (probe, "(X22X) no need to keep on running custom init");
|
||||||
mm_port_get_device (MM_PORT (ctx->port)));
|
|
||||||
g_task_return_boolean (task, TRUE);
|
g_task_return_boolean (task, TRUE);
|
||||||
g_object_unref (task);
|
g_object_unref (task);
|
||||||
return;
|
return;
|
||||||
@@ -190,7 +194,7 @@ create_modem (MMPlugin *self,
|
|||||||
{
|
{
|
||||||
#if defined WITH_QMI
|
#if defined WITH_QMI
|
||||||
if (mm_port_probe_list_has_qmi_port (probes)) {
|
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,
|
return MM_BASE_MODEM (mm_broadband_modem_qmi_new (uid,
|
||||||
drivers,
|
drivers,
|
||||||
mm_plugin_get_name (self),
|
mm_plugin_get_name (self),
|
||||||
|
Reference in New Issue
Block a user