iface-modem-3gpp: cleanup CS and PS registrations during disable
This commit is contained in:
@@ -570,6 +570,8 @@ static void interface_disabling_step (DisablingContext *ctx);
|
||||
|
||||
typedef enum {
|
||||
DISABLING_STEP_FIRST,
|
||||
DISABLING_STEP_CLEANUP_PS_REGISTRATION,
|
||||
DISABLING_STEP_CLEANUP_CS_REGISTRATION,
|
||||
DISABLING_STEP_CLEANUP_UNSOLICITED_REGISTRATION,
|
||||
DISABLING_STEP_LAST
|
||||
} DisablingStep;
|
||||
@@ -646,6 +648,10 @@ mm_iface_modem_3gpp_disable_finish (MMIfaceModem3gpp *self,
|
||||
|
||||
VOID_REPLY_READY_FN (cleanup_unsolicited_registration,
|
||||
"cleanup unsolicited registration")
|
||||
VOID_REPLY_READY_FN (cleanup_ps_registration,
|
||||
"cleanup PS registration")
|
||||
VOID_REPLY_READY_FN (cleanup_cs_registration,
|
||||
"cleanup CS registration")
|
||||
|
||||
static void
|
||||
interface_disabling_step (DisablingContext *ctx)
|
||||
@@ -655,6 +661,30 @@ interface_disabling_step (DisablingContext *ctx)
|
||||
/* Fall down to next step */
|
||||
ctx->step++;
|
||||
|
||||
case DISABLING_STEP_CLEANUP_PS_REGISTRATION:
|
||||
if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->cleanup_ps_registration &&
|
||||
MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->cleanup_ps_registration_finish) {
|
||||
MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->cleanup_ps_registration (
|
||||
ctx->self,
|
||||
(GAsyncReadyCallback)cleanup_ps_registration_ready,
|
||||
ctx);
|
||||
return;
|
||||
}
|
||||
/* Fall down to next step */
|
||||
ctx->step++;
|
||||
|
||||
case DISABLING_STEP_CLEANUP_CS_REGISTRATION:
|
||||
if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->cleanup_cs_registration &&
|
||||
MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->cleanup_cs_registration_finish) {
|
||||
MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->cleanup_cs_registration (
|
||||
ctx->self,
|
||||
(GAsyncReadyCallback)cleanup_cs_registration_ready,
|
||||
ctx);
|
||||
return;
|
||||
}
|
||||
/* Fall down to next step */
|
||||
ctx->step++;
|
||||
|
||||
case DISABLING_STEP_CLEANUP_UNSOLICITED_REGISTRATION:
|
||||
if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->cleanup_unsolicited_registration &&
|
||||
MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->cleanup_unsolicited_registration_finish) {
|
||||
|
||||
@@ -66,6 +66,14 @@ struct _MMIfaceModem3gpp {
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
|
||||
/* Cleanup CS Registration */
|
||||
void (* cleanup_cs_registration) (MMIfaceModem3gpp *self,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
gboolean (*cleanup_cs_registration_finish) (MMIfaceModem3gpp *self,
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
|
||||
/* Setup PS Registration */
|
||||
void (* setup_ps_registration) (MMIfaceModem3gpp *self,
|
||||
GAsyncReadyCallback callback,
|
||||
@@ -74,6 +82,14 @@ struct _MMIfaceModem3gpp {
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
|
||||
/* Cleanup PS Registration */
|
||||
void (* cleanup_ps_registration) (MMIfaceModem3gpp *self,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
gboolean (*cleanup_ps_registration_finish) (MMIfaceModem3gpp *self,
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
|
||||
/* Run CS registration state check.
|
||||
* Note that no registration state is returned, implementations should call
|
||||
* mm_iface_modem_3gpp_update_registration_state(). */
|
||||
|
||||
Reference in New Issue
Block a user