iface-modem: increase number of trials for PIN check from 3 to 6

In practice, it may take longer time for a SIM to become ready when the
modem interface tries to use AT+CPIN? to determine if the SIM is
PIN-locked. This patch increases the number of trials for PIN check to
address the issue.
This commit is contained in:
Ben Chan
2012-08-09 23:05:46 -07:00
committed by Aleksander Morgado
parent 6c9a7c5450
commit 7eb1782023

View File

@@ -2124,9 +2124,9 @@ unlock_check_ready (MMIfaceModem *self,
error->message); error->message);
g_error_free (error); g_error_free (error);
/* Retry up to 3 times */ /* Retry up to 6 times */
if (mm_gdbus_modem_get_unlock_required (ctx->skeleton) != MM_MODEM_LOCK_NONE && if (mm_gdbus_modem_get_unlock_required (ctx->skeleton) != MM_MODEM_LOCK_NONE &&
++ctx->pin_check_tries < 3) { ++ctx->pin_check_tries < 6) {
mm_dbg ("Retrying (%u) unlock required check", ctx->pin_check_tries); mm_dbg ("Retrying (%u) unlock required check", ctx->pin_check_tries);
if (ctx->pin_check_timeout_id) if (ctx->pin_check_timeout_id)
g_source_remove (ctx->pin_check_timeout_id); g_source_remove (ctx->pin_check_timeout_id);