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>
This commit is contained in:

committed by
Aleksander Morgado

parent
84db939565
commit
340ff7dce3
@@ -4080,8 +4080,8 @@ process_common_info (QmiNasServiceStatus service_status,
|
|||||||
gchar **mm_operator_id)
|
gchar **mm_operator_id)
|
||||||
{
|
{
|
||||||
MMModem3gppRegistrationState tmp_registration_state;
|
MMModem3gppRegistrationState tmp_registration_state;
|
||||||
gboolean apply_cs;
|
gboolean apply_cs = TRUE;
|
||||||
gboolean apply_ps;
|
gboolean apply_ps = TRUE;
|
||||||
|
|
||||||
if (service_status != QMI_NAS_SERVICE_STATUS_LIMITED &&
|
if (service_status != QMI_NAS_SERVICE_STATUS_LIMITED &&
|
||||||
service_status != QMI_NAS_SERVICE_STATUS_AVAILABLE &&
|
service_status != QMI_NAS_SERVICE_STATUS_AVAILABLE &&
|
||||||
@@ -4101,6 +4101,8 @@ process_common_info (QmiNasServiceStatus service_status,
|
|||||||
apply_ps = FALSE;
|
apply_ps = FALSE;
|
||||||
else if (domain == QMI_NAS_NETWORK_SERVICE_DOMAIN_PS)
|
else if (domain == QMI_NAS_NETWORK_SERVICE_DOMAIN_PS)
|
||||||
apply_cs = FALSE;
|
apply_cs = FALSE;
|
||||||
|
else if (domain == QMI_NAS_NETWORK_SERVICE_DOMAIN_CS_PS)
|
||||||
|
/* both apply */ ;
|
||||||
|
|
||||||
/* Check if we really are roaming or forbidden */
|
/* Check if we really are roaming or forbidden */
|
||||||
if (forbidden_valid && forbidden)
|
if (forbidden_valid && forbidden)
|
||||||
@@ -4122,7 +4124,7 @@ process_common_info (QmiNasServiceStatus service_status,
|
|||||||
if (apply_cs)
|
if (apply_cs)
|
||||||
*mm_cs_registration_state = tmp_registration_state;
|
*mm_cs_registration_state = tmp_registration_state;
|
||||||
if (apply_ps)
|
if (apply_ps)
|
||||||
*mm_cs_registration_state = tmp_registration_state;
|
*mm_ps_registration_state = tmp_registration_state;
|
||||||
|
|
||||||
if (network_id_valid) {
|
if (network_id_valid) {
|
||||||
*mm_operator_id = g_malloc (7);
|
*mm_operator_id = g_malloc (7);
|
||||||
|
Reference in New Issue
Block a user