iface-modem: report last attempt to load_unlock_required implementations
The load_unlock_required() step will be automatically retried by the generic interface logic unless some specific errors happen (e.g. it won't be retried if a SIM missing error is received). This patch allows telling the implementation of the method whether this time being run is the last one before reporting a hard error or not.
This commit is contained in:
committed by
Aleksander Morgado
parent
137ece0f2f
commit
f2f42e193e
@@ -1074,6 +1074,7 @@ wait_for_sim_ready (GTask *task)
|
||||
|
||||
static void
|
||||
modem_load_unlock_required (MMIfaceModem *self,
|
||||
gboolean last_attempt,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
|
||||
@@ -1101,6 +1101,7 @@ load_unlock_required_context_step (GTask *task)
|
||||
|
||||
static void
|
||||
modem_load_unlock_required (MMIfaceModem *self,
|
||||
gboolean last_attempt,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
|
||||
@@ -1320,6 +1320,7 @@ cpin_query_ready (MMIfaceModem *self,
|
||||
|
||||
static void
|
||||
modem_load_unlock_required (MMIfaceModem *self,
|
||||
gboolean last_attempt,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
|
||||
@@ -372,6 +372,7 @@ internal_load_unlock_required_context_step (GTask *task)
|
||||
g_assert (ctx->pin_check_timeout_id == 0);
|
||||
MM_IFACE_MODEM_GET_INTERFACE (self)->load_unlock_required (
|
||||
self,
|
||||
(ctx->retries == MAX_RETRIES), /* last_attempt? */
|
||||
(GAsyncReadyCallback)load_unlock_required_ready,
|
||||
task);
|
||||
}
|
||||
|
||||
@@ -120,6 +120,7 @@ struct _MMIfaceModem {
|
||||
|
||||
/* Loading of the UnlockRequired property */
|
||||
void (*load_unlock_required) (MMIfaceModem *self,
|
||||
gboolean last_attempt,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
MMModemLock (*load_unlock_required_finish) (MMIfaceModem *self,
|
||||
|
||||
Reference in New Issue
Block a user