[PATCH] fix registration state when built with --with-newest-qmi-commands
Aleksander Morgado
aleksander at aleksander.es
Thu Sep 11 02:39:06 PDT 2014
On 11/09/14 04:00, David McCullough wrote:
>
> 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 at accelecon.com>
>
Pushed to git master, thanks.
>
> diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c
> index d0d672a..4694b06 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);
>
> _______________________________________________
> ModemManager-devel mailing list
> ModemManager-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
>
--
Aleksander
https://aleksander.es
More information about the ModemManager-devel
mailing list