broadband-modem: bearer connection allowance handled in ifaces
This commit is contained in:
@@ -1136,20 +1136,6 @@ reg_state_changed (MMAtSerialPort *port,
|
|||||||
state = get_consolidated_reg_state (self);
|
state = get_consolidated_reg_state (self);
|
||||||
mm_iface_modem_3gpp_update_registration_state (MM_IFACE_MODEM_3GPP (self), state);
|
mm_iface_modem_3gpp_update_registration_state (MM_IFACE_MODEM_3GPP (self), state);
|
||||||
|
|
||||||
/* Allow or forbid connection in 3GPP bearers, based on the new
|
|
||||||
* registration state.
|
|
||||||
*
|
|
||||||
* TODO: don't allow bearers to get connected if roaming forbidden */
|
|
||||||
if (state == MM_MODEM_3GPP_REGISTRATION_STATE_HOME ||
|
|
||||||
state == MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING)
|
|
||||||
mm_bearer_list_foreach (self->priv->modem_bearer_list,
|
|
||||||
(MMBearerListForeachFunc)mm_bearer_set_connection_allowed,
|
|
||||||
NULL);
|
|
||||||
else
|
|
||||||
mm_bearer_list_foreach (self->priv->modem_bearer_list,
|
|
||||||
(MMBearerListForeachFunc)mm_bearer_set_connection_forbidden,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
/* If registration is finished (either registered or failed) but the
|
/* If registration is finished (either registered or failed) but the
|
||||||
* registration query hasn't completed yet, just remove the timeout and
|
* registration query hasn't completed yet, just remove the timeout and
|
||||||
* let the registration query complete by itself.
|
* let the registration query complete by itself.
|
||||||
|
@@ -412,6 +412,7 @@ STR_REPLY_READY_FN (operator_name, "Operator Name")
|
|||||||
static void
|
static void
|
||||||
set_bearer_3gpp_connection_allowed (MMBearer *bearer)
|
set_bearer_3gpp_connection_allowed (MMBearer *bearer)
|
||||||
{
|
{
|
||||||
|
/* TODO: don't allow bearers to get connected if roaming forbidden */
|
||||||
if (MM_IS_BEARER_3GPP (bearer))
|
if (MM_IS_BEARER_3GPP (bearer))
|
||||||
mm_bearer_set_connection_allowed (bearer);
|
mm_bearer_set_connection_allowed (bearer);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user