diff options
author | Dan Williams <dcbw@redhat.com> | 2011-01-05 11:12:08 -0600 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2011-01-05 11:15:11 -0600 |
commit | 794353ebccb04ec00d87820d68e2d25c04d45d3e (patch) | |
tree | b678980741128ebdfd0213420fe19797c3ee2e01 | |
parent | 6c56db07fc3439f54ce6606e14be8963c62f12cc (diff) |
cdma: update reg state to HOME based on SPERI response
If the SPERI response indicates the home network, then set
CDMA registration to HOME if it was REGISTERED (which is
less specific).
-rw-r--r-- | src/mm-generic-cdma.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mm-generic-cdma.c b/src/mm-generic-cdma.c index 386acdb7..02c6b4ed 100644 --- a/src/mm-generic-cdma.c +++ b/src/mm-generic-cdma.c @@ -1526,15 +1526,22 @@ reg_query_speri_done (MMAtSerialPort *port, if (!p || !mm_cdma_parse_eri (p, &roam, NULL, NULL)) goto done; - /* Change the 1x and EVDO registration states to roaming if they were - * anything other than UNKNOWN. - */ if (roam) { + /* Change the 1x and EVDO registration states to roaming if they were + * anything other than UNKNOWN. + */ if (mm_generic_cdma_query_reg_state_get_callback_1x_state (info)) mm_generic_cdma_query_reg_state_set_callback_1x_state (info, MM_MODEM_CDMA_REGISTRATION_STATE_ROAMING); if (mm_generic_cdma_query_reg_state_get_callback_evdo_state (info)) mm_generic_cdma_query_reg_state_set_callback_evdo_state (info, MM_MODEM_CDMA_REGISTRATION_STATE_ROAMING); + } else { + /* Change 1x and/or EVDO registration state to home if home/roaming wasn't previously known */ + if (mm_generic_cdma_query_reg_state_get_callback_1x_state (info) == MM_MODEM_CDMA_REGISTRATION_STATE_REGISTERED) + mm_generic_cdma_query_reg_state_set_callback_1x_state (info, MM_MODEM_CDMA_REGISTRATION_STATE_HOME); + + if (mm_generic_cdma_query_reg_state_get_callback_evdo_state (info) == MM_MODEM_CDMA_REGISTRATION_STATE_REGISTERED) + mm_generic_cdma_query_reg_state_set_callback_evdo_state (info, MM_MODEM_CDMA_REGISTRATION_STATE_HOME); } done: |