aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2020-10-29 23:04:08 +0100
committerAleksander Morgado <aleksander@aleksander.es>2020-10-29 23:04:42 +0000
commitfb14d0dbb24a81be95502e098b8ed23e45db8e1c (patch)
tree906974a0092ed7571cb3d83fa37bce39fc3618e1
parent9c1843c38153ff022491d1a5a663d527f4d8ebc2 (diff)
helpers-qmi: 'illegal' card application state is fatal
No need to retry checking card status when the application state is illegal, just treat the SIM card as unusable right away. https://forum.sierrawireless.com/t/uim-card-application-state-illegal/21842
-rw-r--r--src/mm-modem-helpers-qmi.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mm-modem-helpers-qmi.c b/src/mm-modem-helpers-qmi.c
index 52cad511..af0926fb 100644
--- a/src/mm-modem-helpers-qmi.c
+++ b/src/mm-modem-helpers-qmi.c
@@ -1924,6 +1924,16 @@ mm_qmi_uim_get_card_status_output_parse (gpointer log_
return FALSE;
}
+ /* Illegal application state is fatal, consider it as a failed SIM right
+ * away and don't even attempt to retry */
+ if (app->state == QMI_UIM_CARD_APPLICATION_STATE_ILLEGAL) {
+ g_set_error (error,
+ MM_MOBILE_EQUIPMENT_ERROR,
+ MM_MOBILE_EQUIPMENT_ERROR_SIM_WRONG,
+ "Illegal SIM/USIM application state");
+ return FALSE;
+ }
+
/* If card not ready yet, return RETRY error.
* If the application state reports needing PIN/PUk, consider that ready as
* well, and let the logic fall down to check PIN1/PIN2. */