diff options
author | Dan Williams <dcbw@redhat.com> | 2009-11-29 18:58:21 -0800 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2009-11-29 18:58:21 -0800 |
commit | 9dbf8f22c06a204dd3cd9521c52cc5afafe8d278 (patch) | |
tree | 018aafd72cb998472dc05a5b4aa566778b95eb49 /src | |
parent | d5b0574f587ddab904d3a1f1af3cb2c354486f66 (diff) |
gsm: allow unsolicted registration updates to actually update reg state
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-generic-gsm.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/mm-generic-gsm.c b/src/mm-generic-gsm.c index 5bd1c328..18901963 100644 --- a/src/mm-generic-gsm.c +++ b/src/mm-generic-gsm.c @@ -820,9 +820,6 @@ reg_status_updated (MMGenericGsm *self, int new_value, MMCallbackInfo *info) MMModemGsmNetworkRegStatus status; gboolean status_done = FALSE; - /* info must be set to process status updates - for now */ - g_return_val_if_fail (!!info, status_done); - switch (new_value) { case 0: status = MM_MODEM_GSM_NETWORK_REG_STATUS_IDLE; @@ -854,25 +851,31 @@ reg_status_updated (MMGenericGsm *self, int new_value, MMCallbackInfo *info) case MM_MODEM_GSM_NETWORK_REG_STATUS_HOME: case MM_MODEM_GSM_NETWORK_REG_STATUS_ROAMING: /* Successfully registered - stop registration */ - mm_callback_info_schedule (info); + if (info) + mm_callback_info_schedule (info); mm_generic_gsm_pending_registration_stop (self); status_done = TRUE; break; case MM_MODEM_GSM_NETWORK_REG_STATUS_DENIED: /* registration failed - stop registration */ - info->error = mm_mobile_error_for_code (MM_MOBILE_ERROR_NETWORK_NOT_ALLOWED); - mm_callback_info_schedule (info); + if (info) { + info->error = mm_mobile_error_for_code (MM_MOBILE_ERROR_NETWORK_NOT_ALLOWED); + mm_callback_info_schedule (info); + } mm_generic_gsm_pending_registration_stop (self); status_done = TRUE; break; case MM_MODEM_GSM_NETWORK_REG_STATUS_SEARCHING: - info->error = mm_mobile_error_for_code (MM_MOBILE_ERROR_NETWORK_TIMEOUT); + if (info) + info->error = mm_mobile_error_for_code (MM_MOBILE_ERROR_NETWORK_TIMEOUT); break; case MM_MODEM_GSM_NETWORK_REG_STATUS_IDLE: - info->error = mm_mobile_error_for_code (MM_MOBILE_ERROR_NO_NETWORK); + if (info) + info->error = mm_mobile_error_for_code (MM_MOBILE_ERROR_NO_NETWORK); break; default: - info->error = mm_mobile_error_for_code (MM_MOBILE_ERROR_UNKNOWN); + if (info) + info->error = mm_mobile_error_for_code (MM_MOBILE_ERROR_UNKNOWN); break; } return status_done; |