bearer: add roaming connection allowance rules from the broadband bearer

Connection allowance rules need to be applied to every kind of bearer,
regardless of whether it's based on the generic broadband bearer or not.
This commit is contained in:
Aleksander Morgado
2012-08-30 13:35:37 +02:00
parent 58553df9bb
commit a4e5964506
2 changed files with 218 additions and 189 deletions

View File

@@ -27,6 +27,8 @@
#include "mm-daemon-enums-types.h" #include "mm-daemon-enums-types.h"
#include "mm-iface-modem.h" #include "mm-iface-modem.h"
#include "mm-iface-modem-3gpp.h"
#include "mm-iface-modem-cdma.h"
#include "mm-bearer.h" #include "mm-bearer.h"
#include "mm-base-modem-at.h" #include "mm-base-modem-at.h"
#include "mm-base-modem.h" #include "mm-base-modem.h"
@@ -39,6 +41,14 @@
G_DEFINE_TYPE (MMBearer, mm_bearer, MM_GDBUS_TYPE_BEARER_SKELETON); G_DEFINE_TYPE (MMBearer, mm_bearer, MM_GDBUS_TYPE_BEARER_SKELETON);
typedef enum {
CONNECTION_FORBIDDEN_REASON_NONE,
CONNECTION_FORBIDDEN_REASON_UNREGISTERED,
CONNECTION_FORBIDDEN_REASON_ROAMING,
CONNECTION_FORBIDDEN_REASON_LAST
} ConnectionForbiddenReason;
enum { enum {
PROP_0, PROP_0,
PROP_PATH, PROP_PATH,
@@ -67,6 +77,27 @@ struct _MMBearerPrivate {
GCancellable *connect_cancellable; GCancellable *connect_cancellable;
/* handler id for the disconnect + cancel connect request */ /* handler id for the disconnect + cancel connect request */
gulong disconnect_signal_handler; gulong disconnect_signal_handler;
/*-- 3GPP specific --*/
/* Reason if 3GPP connection is forbidden */
ConnectionForbiddenReason reason_3gpp;
/* Handler ID for the registration state change signals */
guint id_3gpp_registration_change;
/*-- CDMA specific --*/
/* Reason if CDMA connection is forbidden */
ConnectionForbiddenReason reason_cdma;
/* Handler IDs for the registration state change signals */
guint id_cdma1x_registration_change;
guint id_evdo_registration_change;
};
/*****************************************************************************/
static const gchar *connection_forbidden_reason_str [CONNECTION_FORBIDDEN_REASON_LAST] = {
"none",
"Not registered in the network",
"Registered in roaming network, and roaming not allowed"
}; };
/*****************************************************************************/ /*****************************************************************************/
@@ -138,6 +169,132 @@ bearer_update_status_connected (MMBearer *self,
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_STATUS]); g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_STATUS]);
} }
/*****************************************************************************/
static void
modem_3gpp_registration_state_changed (MMIfaceModem3gpp *modem,
GParamSpec *pspec,
MMBearer *self)
{
MMModem3gppRegistrationState state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
g_object_get (modem,
MM_IFACE_MODEM_3GPP_REGISTRATION_STATE, &state,
NULL);
switch (state) {
case MM_MODEM_3GPP_REGISTRATION_STATE_IDLE:
case MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING:
case MM_MODEM_3GPP_REGISTRATION_STATE_DENIED:
case MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN:
mm_dbg ("Bearer not allowed to connect, not registered");
self->priv->reason_3gpp = CONNECTION_FORBIDDEN_REASON_UNREGISTERED;
break;
case MM_MODEM_3GPP_REGISTRATION_STATE_HOME:
mm_dbg ("Bearer allowed to connect, registered in home network");
self->priv->reason_3gpp = CONNECTION_FORBIDDEN_REASON_NONE;
break;
case MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING:
if (mm_bearer_properties_get_allow_roaming (mm_bearer_peek_config (MM_BEARER (self)))) {
mm_dbg ("Bearer allowed to connect, registered in roaming network");
self->priv->reason_3gpp = CONNECTION_FORBIDDEN_REASON_NONE;
} else {
mm_dbg ("Bearer not allowed to connect, registered in roaming network");
self->priv->reason_3gpp = CONNECTION_FORBIDDEN_REASON_ROAMING;
}
break;
}
/* close connection if some reason found */
if (self->priv->reason_3gpp != CONNECTION_FORBIDDEN_REASON_NONE)
mm_bearer_disconnect_force (MM_BEARER (self));
}
static void
modem_cdma_registration_state_changed (MMIfaceModemCdma *modem,
GParamSpec *pspec,
MMBearer *self)
{
MMModemCdmaRegistrationState cdma1x_state = MM_MODEM_CDMA_REGISTRATION_STATE_UNKNOWN;
MMModemCdmaRegistrationState evdo_state = MM_MODEM_CDMA_REGISTRATION_STATE_UNKNOWN;
g_object_get (modem,
MM_IFACE_MODEM_CDMA_CDMA1X_REGISTRATION_STATE, &cdma1x_state,
MM_IFACE_MODEM_CDMA_EVDO_REGISTRATION_STATE, &evdo_state,
NULL);
if (cdma1x_state == MM_MODEM_CDMA_REGISTRATION_STATE_ROAMING ||
evdo_state == MM_MODEM_CDMA_REGISTRATION_STATE_ROAMING) {
if (mm_bearer_properties_get_allow_roaming (mm_bearer_peek_config (MM_BEARER (self)))) {
mm_dbg ("Bearer allowed to connect, registered in roaming network");
self->priv->reason_cdma = CONNECTION_FORBIDDEN_REASON_NONE;
} else {
mm_dbg ("Bearer not allowed to connect, registered in roaming network");
self->priv->reason_cdma = CONNECTION_FORBIDDEN_REASON_ROAMING;
}
} else if (cdma1x_state != MM_MODEM_CDMA_REGISTRATION_STATE_UNKNOWN ||
evdo_state != MM_MODEM_CDMA_REGISTRATION_STATE_UNKNOWN) {
mm_dbg ("Bearer allowed to connect, registered in home network");
self->priv->reason_cdma = CONNECTION_FORBIDDEN_REASON_NONE;
} else {
mm_dbg ("Bearer not allowed to connect, not registered");
self->priv->reason_cdma = CONNECTION_FORBIDDEN_REASON_UNREGISTERED;
}
/* close connection if some reason found */
if (self->priv->reason_cdma != CONNECTION_FORBIDDEN_REASON_NONE)
mm_bearer_disconnect_force (MM_BEARER (self));
}
static void
set_signal_handlers (MMBearer *self)
{
g_assert (self->priv->modem != NULL);
if (mm_iface_modem_is_3gpp (MM_IFACE_MODEM (self->priv->modem))) {
self->priv->id_3gpp_registration_change =
g_signal_connect (self->priv->modem,
"notify::" MM_IFACE_MODEM_3GPP_REGISTRATION_STATE,
G_CALLBACK (modem_3gpp_registration_state_changed),
self);
modem_3gpp_registration_state_changed (MM_IFACE_MODEM_3GPP (self->priv->modem), NULL, self);
}
if (mm_iface_modem_is_cdma (MM_IFACE_MODEM (self->priv->modem))) {
self->priv->id_cdma1x_registration_change =
g_signal_connect (self->priv->modem,
"notify::" MM_IFACE_MODEM_CDMA_CDMA1X_REGISTRATION_STATE,
G_CALLBACK (modem_cdma_registration_state_changed),
self);
self->priv->id_evdo_registration_change =
g_signal_connect (self->priv->modem,
"notify::" MM_IFACE_MODEM_CDMA_EVDO_REGISTRATION_STATE,
G_CALLBACK (modem_cdma_registration_state_changed),
self);
modem_cdma_registration_state_changed (MM_IFACE_MODEM_CDMA (self->priv->modem), NULL, self);
}
}
static void
reset_signal_handlers (MMBearer *self)
{
if (!self->priv->modem)
return;
if (self->priv->id_3gpp_registration_change) {
g_signal_handler_disconnect (self->priv->modem, self->priv->id_3gpp_registration_change);
self->priv->id_3gpp_registration_change = 0;
}
if (self->priv->id_cdma1x_registration_change) {
g_signal_handler_disconnect (self->priv->modem, self->priv->id_cdma1x_registration_change);
self->priv->id_cdma1x_registration_change = 0;
}
if (self->priv->id_evdo_registration_change) {
g_signal_handler_disconnect (self->priv->modem, self->priv->id_evdo_registration_change);
self->priv->id_evdo_registration_change = 0;
}
}
/*****************************************************************************/ /*****************************************************************************/
/* CONNECT */ /* CONNECT */
@@ -277,6 +434,34 @@ mm_bearer_connect (MMBearer *self,
return; return;
} }
/* Check 3GPP roaming allowance */
if (mm_iface_modem_is_3gpp (MM_IFACE_MODEM (self->priv->modem)) &&
self->priv->reason_3gpp != CONNECTION_FORBIDDEN_REASON_NONE) {
g_simple_async_report_error_in_idle (
G_OBJECT (self),
callback,
user_data,
MM_CORE_ERROR,
MM_CORE_ERROR_UNAUTHORIZED,
"Not allowed to connect bearer in 3GPP network: '%s'",
connection_forbidden_reason_str[self->priv->reason_3gpp]);
return;
}
/* Check CDMA roaming allowance */
if (mm_iface_modem_is_cdma (MM_IFACE_MODEM (self->priv->modem)) &&
self->priv->reason_cdma != CONNECTION_FORBIDDEN_REASON_NONE) {
g_simple_async_report_error_in_idle (
G_OBJECT (self),
callback,
user_data,
MM_CORE_ERROR,
MM_CORE_ERROR_UNAUTHORIZED,
"Not allowed to connect bearer in CDMA network: '%s'",
connection_forbidden_reason_str[self->priv->reason_cdma]);
return;
}
result = g_simple_async_result_new (G_OBJECT (self), result = g_simple_async_result_new (G_OBJECT (self),
callback, callback,
user_data, user_data,
@@ -720,12 +905,16 @@ set_property (GObject *object,
case PROP_MODEM: case PROP_MODEM:
g_clear_object (&self->priv->modem); g_clear_object (&self->priv->modem);
self->priv->modem = g_value_dup_object (value); self->priv->modem = g_value_dup_object (value);
if (self->priv->modem) if (self->priv->modem) {
/* Bind the modem's connection (which is set when it is exported, /* Bind the modem's connection (which is set when it is exported,
* and unset when unexported) to the BEARER's connection */ * and unset when unexported) to the BEARER's connection */
g_object_bind_property (self->priv->modem, MM_BASE_MODEM_CONNECTION, g_object_bind_property (self->priv->modem, MM_BASE_MODEM_CONNECTION,
self, MM_BEARER_CONNECTION, self, MM_BEARER_CONNECTION,
G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE); G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE);
/* Listen to 3GPP/CDMA registration state changes */
set_signal_handlers (self);
}
break; break;
case PROP_STATUS: case PROP_STATUS:
/* We don't allow g_object_set()-ing the status property */ /* We don't allow g_object_set()-ing the status property */
@@ -787,6 +976,8 @@ mm_bearer_init (MMBearer *self)
MM_TYPE_BEARER, MM_TYPE_BEARER,
MMBearerPrivate); MMBearerPrivate);
self->priv->status = MM_BEARER_STATUS_DISCONNECTED; self->priv->status = MM_BEARER_STATUS_DISCONNECTED;
self->priv->reason_3gpp = CONNECTION_FORBIDDEN_REASON_NONE;
self->priv->reason_cdma = CONNECTION_FORBIDDEN_REASON_NONE;
/* Set defaults */ /* Set defaults */
mm_gdbus_bearer_set_interface (MM_GDBUS_BEARER (self), NULL); mm_gdbus_bearer_set_interface (MM_GDBUS_BEARER (self), NULL);
@@ -820,6 +1011,8 @@ dispose (GObject *object)
g_clear_object (&self->priv->connection); g_clear_object (&self->priv->connection);
} }
reset_signal_handlers (self);
g_clear_object (&self->priv->modem); g_clear_object (&self->priv->modem);
g_clear_object (&self->priv->config); g_clear_object (&self->priv->config);

View File

@@ -41,13 +41,6 @@ G_DEFINE_TYPE_EXTENDED (MMBroadbandBearer, mm_broadband_bearer, MM_TYPE_BEARER,
G_IMPLEMENT_INTERFACE (G_TYPE_ASYNC_INITABLE, G_IMPLEMENT_INTERFACE (G_TYPE_ASYNC_INITABLE,
async_initable_iface_init)); async_initable_iface_init));
typedef enum {
CONNECTION_FORBIDDEN_REASON_NONE,
CONNECTION_FORBIDDEN_REASON_UNREGISTERED,
CONNECTION_FORBIDDEN_REASON_ROAMING,
CONNECTION_FORBIDDEN_REASON_LAST
} ConnectionForbiddenReason;
typedef enum { typedef enum {
CONNECTION_TYPE_NONE, CONNECTION_TYPE_NONE,
CONNECTION_TYPE_3GPP, CONNECTION_TYPE_3GPP,
@@ -62,19 +55,8 @@ struct _MMBroadbandBearerPrivate {
ConnectionType connection_type; ConnectionType connection_type;
/*-- 3GPP specific --*/ /*-- 3GPP specific --*/
/* Reason if 3GPP connection is forbidden */
ConnectionForbiddenReason reason_3gpp;
/* Handler ID for the registration state change signals */
guint id_3gpp_registration_change;
/* CID of the PDP context */ /* CID of the PDP context */
guint cid; guint cid;
/*-- CDMA specific --*/
/* Reason if CDMA connection is forbidden */
ConnectionForbiddenReason reason_cdma;
/* Handler IDs for the registration state change signals */
guint id_cdma1x_registration_change;
guint id_evdo_registration_change;
}; };
/*****************************************************************************/ /*****************************************************************************/
@@ -85,14 +67,6 @@ mm_broadband_bearer_get_3gpp_cid (MMBroadbandBearer *self)
return self->priv->cid; return self->priv->cid;
} }
/*****************************************************************************/
static const gchar *connection_forbidden_reason_str [CONNECTION_FORBIDDEN_REASON_LAST] = {
"none",
"Not registered in the network",
"Registered in roaming network, and roaming not allowed"
};
/*****************************************************************************/ /*****************************************************************************/
/* Detailed connect result, used in both CDMA and 3GPP sequences */ /* Detailed connect result, used in both CDMA and 3GPP sequences */
typedef struct { typedef struct {
@@ -1279,8 +1253,6 @@ connect (MMBearer *self,
/* If the modem has 3GPP capabilities, launch 3GPP-based connection */ /* If the modem has 3GPP capabilities, launch 3GPP-based connection */
if (mm_iface_modem_is_3gpp (MM_IFACE_MODEM (modem))) { if (mm_iface_modem_is_3gpp (MM_IFACE_MODEM (modem))) {
/* Launch connection if allowed */
if (MM_BROADBAND_BEARER (self)->priv->reason_3gpp == CONNECTION_FORBIDDEN_REASON_NONE) {
MM_BROADBAND_BEARER_GET_CLASS (self)->connect_3gpp ( MM_BROADBAND_BEARER_GET_CLASS (self)->connect_3gpp (
MM_BROADBAND_BEARER (self), MM_BROADBAND_BEARER (self),
MM_BROADBAND_MODEM (modem), MM_BROADBAND_MODEM (modem),
@@ -1294,14 +1266,8 @@ connect (MMBearer *self,
return; return;
} }
mm_dbg ("Not allowed to connect bearer in 3GPP network: '%s'",
connection_forbidden_reason_str[MM_BROADBAND_BEARER (self)->priv->reason_3gpp]);
}
/* Otherwise, launch CDMA-specific connection */ /* Otherwise, launch CDMA-specific connection */
if (mm_iface_modem_is_cdma (MM_IFACE_MODEM (modem))) { if (mm_iface_modem_is_cdma (MM_IFACE_MODEM (modem))) {
/* Launch connection if allowed */
if (MM_BROADBAND_BEARER (self)->priv->reason_cdma == CONNECTION_FORBIDDEN_REASON_NONE) {
MM_BROADBAND_BEARER_GET_CLASS (self)->connect_cdma ( MM_BROADBAND_BEARER_GET_CLASS (self)->connect_cdma (
MM_BROADBAND_BEARER (self), MM_BROADBAND_BEARER (self),
MM_BROADBAND_MODEM (modem), MM_BROADBAND_MODEM (modem),
@@ -1314,15 +1280,8 @@ connect (MMBearer *self,
g_object_unref (modem); g_object_unref (modem);
return; return;
} }
mm_dbg ("Not allowed to connect bearer in CDMA network: '%s'",
connection_forbidden_reason_str[MM_BROADBAND_BEARER (self)->priv->reason_cdma]);
}
g_simple_async_result_set_error (ctx->result, g_assert_not_reached ();
MM_CORE_ERROR,
MM_CORE_ERROR_UNAUTHORIZED,
"Not allowed to connect bearer");
connect_context_complete_and_free (ctx);
} }
/*****************************************************************************/ /*****************************************************************************/
@@ -1902,83 +1861,6 @@ crm_range_ready (MMBaseModem *modem,
init_async_context_free (ctx, TRUE); init_async_context_free (ctx, TRUE);
} }
static void
modem_3gpp_registration_state_changed (MMBroadbandModem *modem,
GParamSpec *pspec,
MMBroadbandBearer *self)
{
MMModem3gppRegistrationState state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
g_object_get (modem,
MM_IFACE_MODEM_3GPP_REGISTRATION_STATE, &state,
NULL);
switch (state) {
case MM_MODEM_3GPP_REGISTRATION_STATE_IDLE:
case MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING:
case MM_MODEM_3GPP_REGISTRATION_STATE_DENIED:
case MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN:
mm_dbg ("Bearer not allowed to connect, not registered");
self->priv->reason_3gpp = CONNECTION_FORBIDDEN_REASON_UNREGISTERED;
break;
case MM_MODEM_3GPP_REGISTRATION_STATE_HOME:
mm_dbg ("Bearer allowed to connect, registered in home network");
self->priv->reason_3gpp = CONNECTION_FORBIDDEN_REASON_NONE;
break;
case MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING:
if (mm_bearer_properties_get_allow_roaming (mm_bearer_peek_config (MM_BEARER (self)))) {
mm_dbg ("Bearer allowed to connect, registered in roaming network");
self->priv->reason_3gpp = CONNECTION_FORBIDDEN_REASON_NONE;
} else {
mm_dbg ("Bearer not allowed to connect, registered in roaming network");
self->priv->reason_3gpp = CONNECTION_FORBIDDEN_REASON_ROAMING;
}
break;
}
/* close connection if we're connected in 3GPP */
if (self->priv->reason_3gpp != CONNECTION_FORBIDDEN_REASON_NONE &&
self->priv->connection_type == CONNECTION_TYPE_3GPP)
mm_bearer_disconnect_force (MM_BEARER (self));
}
static void
modem_cdma_registration_state_changed (MMBroadbandModem *modem,
GParamSpec *pspec,
MMBroadbandBearer *self)
{
MMModemCdmaRegistrationState cdma1x_state = MM_MODEM_CDMA_REGISTRATION_STATE_UNKNOWN;
MMModemCdmaRegistrationState evdo_state = MM_MODEM_CDMA_REGISTRATION_STATE_UNKNOWN;
g_object_get (modem,
MM_IFACE_MODEM_CDMA_CDMA1X_REGISTRATION_STATE, &cdma1x_state,
MM_IFACE_MODEM_CDMA_EVDO_REGISTRATION_STATE, &evdo_state,
NULL);
if (cdma1x_state == MM_MODEM_CDMA_REGISTRATION_STATE_ROAMING ||
evdo_state == MM_MODEM_CDMA_REGISTRATION_STATE_ROAMING) {
if (mm_bearer_properties_get_allow_roaming (mm_bearer_peek_config (MM_BEARER (self)))) {
mm_dbg ("Bearer allowed to connect, registered in roaming network");
self->priv->reason_cdma = CONNECTION_FORBIDDEN_REASON_NONE;
} else {
mm_dbg ("Bearer not allowed to connect, registered in roaming network");
self->priv->reason_cdma = CONNECTION_FORBIDDEN_REASON_ROAMING;
}
} else if (cdma1x_state != MM_MODEM_CDMA_REGISTRATION_STATE_UNKNOWN ||
evdo_state != MM_MODEM_CDMA_REGISTRATION_STATE_UNKNOWN) {
mm_dbg ("Bearer allowed to connect, registered in home network");
self->priv->reason_cdma = CONNECTION_FORBIDDEN_REASON_NONE;
} else {
mm_dbg ("Bearer not allowed to connect, not registered");
self->priv->reason_cdma = CONNECTION_FORBIDDEN_REASON_UNREGISTERED;
}
/* close connection if we're connected in CDMA */
if (self->priv->reason_cdma != CONNECTION_FORBIDDEN_REASON_NONE &&
self->priv->connection_type == CONNECTION_TYPE_CDMA)
mm_bearer_disconnect_force (MM_BEARER (self));
}
static void static void
interface_initialization_step (InitAsyncContext *ctx) interface_initialization_step (InitAsyncContext *ctx)
{ {
@@ -2009,30 +1891,6 @@ interface_initialization_step (InitAsyncContext *ctx)
ctx->step++; ctx->step++;
case INITIALIZATION_STEP_LAST: case INITIALIZATION_STEP_LAST:
if (mm_iface_modem_is_3gpp (MM_IFACE_MODEM (ctx->modem))) {
ctx->self->priv->id_3gpp_registration_change =
g_signal_connect (ctx->modem,
"notify::" MM_IFACE_MODEM_3GPP_REGISTRATION_STATE,
G_CALLBACK (modem_3gpp_registration_state_changed),
ctx->self);
modem_3gpp_registration_state_changed (MM_BROADBAND_MODEM (ctx->modem), NULL, ctx->self);
}
if (mm_iface_modem_is_cdma (MM_IFACE_MODEM (ctx->modem))) {
ctx->self->priv->id_cdma1x_registration_change =
g_signal_connect (ctx->modem,
"notify::" MM_IFACE_MODEM_CDMA_CDMA1X_REGISTRATION_STATE,
G_CALLBACK (modem_cdma_registration_state_changed),
ctx->self);
ctx->self->priv->id_evdo_registration_change =
g_signal_connect (ctx->modem,
"notify::" MM_IFACE_MODEM_CDMA_EVDO_REGISTRATION_STATE,
G_CALLBACK (modem_cdma_registration_state_changed),
ctx->self);
modem_cdma_registration_state_changed (MM_BROADBAND_MODEM (ctx->modem), NULL, ctx->self);
}
/* We are done without errors! */ /* We are done without errors! */
g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE); g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE);
g_simple_async_result_complete_in_idle (ctx->result); g_simple_async_result_complete_in_idle (ctx->result);
@@ -2116,36 +1974,14 @@ mm_broadband_bearer_init (MMBroadbandBearer *self)
/* Set defaults */ /* Set defaults */
self->priv->connection_type = CONNECTION_TYPE_NONE; self->priv->connection_type = CONNECTION_TYPE_NONE;
self->priv->reason_3gpp = CONNECTION_FORBIDDEN_REASON_NONE;
self->priv->reason_cdma = CONNECTION_FORBIDDEN_REASON_NONE;
} }
static void static void
dispose (GObject *object) dispose (GObject *object)
{ {
MMBroadbandBearer *self = MM_BROADBAND_BEARER (object); MMBroadbandBearer *self = MM_BROADBAND_BEARER (object);
MMBroadbandModem *modem = NULL;
g_object_get (self, reset_bearer_connection (self);
MM_BEARER_MODEM, &modem,
NULL);
/* We will disconnect the signals before calling parent's dispose, so that
* we can get the 'modem' object we need to perform the disconnection */
if (self->priv->id_3gpp_registration_change) {
g_signal_handler_disconnect (modem, self->priv->id_3gpp_registration_change);
self->priv->id_3gpp_registration_change = 0;
}
if (self->priv->id_cdma1x_registration_change) {
g_signal_handler_disconnect (modem, self->priv->id_cdma1x_registration_change);
self->priv->id_cdma1x_registration_change = 0;
}
if (self->priv->id_evdo_registration_change) {
g_signal_handler_disconnect (modem, self->priv->id_evdo_registration_change);
self->priv->id_evdo_registration_change = 0;
}
g_object_unref (modem);
G_OBJECT_CLASS (mm_broadband_bearer_parent_class)->dispose (object); G_OBJECT_CLASS (mm_broadband_bearer_parent_class)->dispose (object);
} }