diff options
author | David McCullough <david.mccullough@accelecon.com> | 2014-09-11 12:00:33 +1000 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2014-09-11 11:01:40 +0200 |
commit | 340ff7dce3517b2b476a408572794e5206f43bac (patch) | |
tree | ba2075052c61a3fdc53e549eeaa1e7b76b80a1a5 | |
parent | 84db93956591947843f640d11ab474c77486f6b5 (diff) |
broadband-modem-qmi: fix registration state when built with --with-newest-qmi-commands
This patch fixes the registration reporting/checking when ModemManager is
built with --with-newest-qmi-commands. apply_cs and apply_ps were not
properly initialised and may never be true. Also fixes a CnP error for
mm_ps_registration_state.
Signed-off-by: David McCullough <david.mccullough@accelecon.com>
-rw-r--r-- | src/mm-broadband-modem-qmi.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c index 045b3702..f4b6c558 100644 --- a/src/mm-broadband-modem-qmi.c +++ b/src/mm-broadband-modem-qmi.c @@ -4080,8 +4080,8 @@ process_common_info (QmiNasServiceStatus service_status, gchar **mm_operator_id) { MMModem3gppRegistrationState tmp_registration_state; - gboolean apply_cs; - gboolean apply_ps; + gboolean apply_cs = TRUE; + gboolean apply_ps = TRUE; if (service_status != QMI_NAS_SERVICE_STATUS_LIMITED && service_status != QMI_NAS_SERVICE_STATUS_AVAILABLE && @@ -4101,6 +4101,8 @@ process_common_info (QmiNasServiceStatus service_status, apply_ps = FALSE; else if (domain == QMI_NAS_NETWORK_SERVICE_DOMAIN_PS) apply_cs = FALSE; + else if (domain == QMI_NAS_NETWORK_SERVICE_DOMAIN_CS_PS) + /* both apply */ ; /* Check if we really are roaming or forbidden */ if (forbidden_valid && forbidden) @@ -4122,7 +4124,7 @@ process_common_info (QmiNasServiceStatus service_status, if (apply_cs) *mm_cs_registration_state = tmp_registration_state; if (apply_ps) - *mm_cs_registration_state = tmp_registration_state; + *mm_ps_registration_state = tmp_registration_state; if (network_id_valid) { *mm_operator_id = g_malloc (7); |