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.
This commit is contained in:
Aleksander Morgado
2013-03-12 10:59:14 +01:00
parent 0dea5b5d72
commit 2bcc647d3e

View File

@@ -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,