iface-modem-cdma: skip checks to see if unsolicited events are supported
This commit is contained in:
@@ -30,10 +30,8 @@
|
|||||||
#define SUBSYSTEM_EVDO "evdo"
|
#define SUBSYSTEM_EVDO "evdo"
|
||||||
|
|
||||||
#define REGISTRATION_CHECK_CONTEXT_TAG "cdma-registration-check-context-tag"
|
#define REGISTRATION_CHECK_CONTEXT_TAG "cdma-registration-check-context-tag"
|
||||||
#define UNSOLICITED_EVENTS_SUPPORTED_TAG "cdma-unsolicited-events-supported-tag"
|
|
||||||
|
|
||||||
static GQuark registration_check_context_quark;
|
static GQuark registration_check_context_quark;
|
||||||
static GQuark unsolicited_events_supported_quark;
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
@@ -1187,21 +1185,13 @@ interface_disabling_step (DisablingContext *ctx)
|
|||||||
ctx->step++;
|
ctx->step++;
|
||||||
|
|
||||||
case DISABLING_STEP_CLEANUP_UNSOLICITED_EVENTS:
|
case DISABLING_STEP_CLEANUP_UNSOLICITED_EVENTS:
|
||||||
if (G_UNLIKELY (!unsolicited_events_supported_quark))
|
if (MM_IFACE_MODEM_CDMA_GET_INTERFACE (ctx->self)->cleanup_unsolicited_events &&
|
||||||
unsolicited_events_supported_quark = (g_quark_from_static_string (
|
MM_IFACE_MODEM_CDMA_GET_INTERFACE (ctx->self)->cleanup_unsolicited_events_finish) {
|
||||||
UNSOLICITED_EVENTS_SUPPORTED_TAG));
|
MM_IFACE_MODEM_CDMA_GET_INTERFACE (ctx->self)->cleanup_unsolicited_events (
|
||||||
|
ctx->self,
|
||||||
/* Only try to disable if supported */
|
(GAsyncReadyCallback)cleanup_unsolicited_events_ready,
|
||||||
if (GPOINTER_TO_UINT (g_object_get_qdata (G_OBJECT (ctx->self),
|
ctx);
|
||||||
unsolicited_events_supported_quark))) {
|
return;
|
||||||
if (MM_IFACE_MODEM_CDMA_GET_INTERFACE (ctx->self)->cleanup_unsolicited_events &&
|
|
||||||
MM_IFACE_MODEM_CDMA_GET_INTERFACE (ctx->self)->cleanup_unsolicited_events_finish) {
|
|
||||||
MM_IFACE_MODEM_CDMA_GET_INTERFACE (ctx->self)->cleanup_unsolicited_events (
|
|
||||||
ctx->self,
|
|
||||||
(GAsyncReadyCallback)cleanup_unsolicited_events_ready,
|
|
||||||
ctx);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* Fall down to next step */
|
/* Fall down to next step */
|
||||||
ctx->step++;
|
ctx->step++;
|
||||||
@@ -1316,11 +1306,6 @@ setup_unsolicited_events_ready (MMIfaceModemCdma *self,
|
|||||||
/* This error shouldn't be treated as critical */
|
/* This error shouldn't be treated as critical */
|
||||||
mm_dbg ("Setting up unsolicited events failed: '%s'", error->message);
|
mm_dbg ("Setting up unsolicited events failed: '%s'", error->message);
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
|
|
||||||
/* Reset support flag */
|
|
||||||
g_object_set_qdata (G_OBJECT (self),
|
|
||||||
unsolicited_events_supported_quark,
|
|
||||||
GUINT_TO_POINTER (FALSE));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Go on to next step */
|
/* Go on to next step */
|
||||||
@@ -1361,17 +1346,13 @@ interface_enabling_step (EnablingContext *ctx)
|
|||||||
ctx->step++;
|
ctx->step++;
|
||||||
|
|
||||||
case ENABLING_STEP_SETUP_UNSOLICITED_EVENTS:
|
case ENABLING_STEP_SETUP_UNSOLICITED_EVENTS:
|
||||||
/* Only try to setup unsolicited events if they are supported */
|
if (MM_IFACE_MODEM_CDMA_GET_INTERFACE (ctx->self)->setup_unsolicited_events &&
|
||||||
if (GPOINTER_TO_UINT (g_object_get_qdata (G_OBJECT (ctx->self),
|
MM_IFACE_MODEM_CDMA_GET_INTERFACE (ctx->self)->setup_unsolicited_events_finish) {
|
||||||
unsolicited_events_supported_quark))) {
|
MM_IFACE_MODEM_CDMA_GET_INTERFACE (ctx->self)->setup_unsolicited_events (
|
||||||
if (MM_IFACE_MODEM_CDMA_GET_INTERFACE (ctx->self)->setup_unsolicited_events &&
|
ctx->self,
|
||||||
MM_IFACE_MODEM_CDMA_GET_INTERFACE (ctx->self)->setup_unsolicited_events_finish) {
|
(GAsyncReadyCallback)setup_unsolicited_events_ready,
|
||||||
MM_IFACE_MODEM_CDMA_GET_INTERFACE (ctx->self)->setup_unsolicited_events (
|
ctx);
|
||||||
ctx->self,
|
return;
|
||||||
(GAsyncReadyCallback)setup_unsolicited_events_ready,
|
|
||||||
ctx);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* Fall down to next step */
|
/* Fall down to next step */
|
||||||
ctx->step++;
|
ctx->step++;
|
||||||
@@ -1618,14 +1599,6 @@ mm_iface_modem_cdma_initialize (MMIfaceModemCdma *self,
|
|||||||
g_object_set (self,
|
g_object_set (self,
|
||||||
MM_IFACE_MODEM_CDMA_DBUS_SKELETON, skeleton,
|
MM_IFACE_MODEM_CDMA_DBUS_SKELETON, skeleton,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
/* Initially, assume we support unsolicited events */
|
|
||||||
if (G_UNLIKELY (!unsolicited_events_supported_quark))
|
|
||||||
unsolicited_events_supported_quark = (g_quark_from_static_string (
|
|
||||||
UNSOLICITED_EVENTS_SUPPORTED_TAG));
|
|
||||||
g_object_set_qdata (G_OBJECT (self),
|
|
||||||
unsolicited_events_supported_quark,
|
|
||||||
GUINT_TO_POINTER (TRUE));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Perform async initialization here */
|
/* Perform async initialization here */
|
||||||
|
Reference in New Issue
Block a user