From 2bcc647d3e1fa548b224dfb23ce5489ce6c5ac44 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Tue, 12 Mar 2013 10:59:14 +0100 Subject: [PATCH] broadband-modem-qmi: handle 'UimUninitialized' error when checking unlock status QMI modems without SIM may report 'UimUninitialized' QMI protocol errors, so catch those and use them as 'SIM failure' so that they get reported to the user. --- src/mm-broadband-modem-qmi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c index c7fc7d65..6351df6a 100644 --- a/src/mm-broadband-modem-qmi.c +++ b/src/mm-broadband-modem-qmi.c @@ -1118,7 +1118,10 @@ dms_uim_get_pin_status_ready (QmiClientDms *client, * needs to be fatal so that we mark the modem unusable. */ if (g_error_matches (error, QMI_PROTOCOL_ERROR, - QMI_PROTOCOL_ERROR_INTERNAL)) { + QMI_PROTOCOL_ERROR_INTERNAL) || + g_error_matches (error, + QMI_PROTOCOL_ERROR, + QMI_PROTOCOL_ERROR_UIM_UNINITIALIZED)) { g_simple_async_result_set_error (simple, MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_SIM_FAILURE,