iface-modem-3gpp: ignore initial registration check result when enabling
This patch extends commit c9e85b671
("iface-modem-3gpp: ignore initial
registration check result when appropriate") to handle the situation
where a registration check update may prematurely transition the modem
to the 'enabled' state while the modem is still being enabled.
The issue is identified by Dan Williams <dcbw@redhat.com>. More details
can be found in https://bugs.freedesktop.org/show_bug.cgi?id=106468
This commit is contained in:

committed by
Aleksander Morgado

parent
3e469e7b80
commit
051b15cca8
@@ -1332,17 +1332,17 @@ update_registration_state (MMIfaceModem3gpp *self,
|
|||||||
if (ctx->reloading_registration_info)
|
if (ctx->reloading_registration_info)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* If the modem isn't already enabled or being enabled, this
|
/* If the modem isn't already enabled, this registration state update
|
||||||
* registration state update is due to a previously scheduled
|
* could be due to a previously scheduled initial registration check
|
||||||
* initial registration check when the modem was being enabled.
|
* when the modem was being enabled. We need to ignore it as otherwise
|
||||||
* We need to ignore it as otherwise it may cause an incorrect
|
* it may cause an incorrect transition of the registration state and
|
||||||
* transition of the registration state and modem state when the
|
* modem state when the modem is being disabled or still going through
|
||||||
* modem is being disabled. */
|
* enable steps */
|
||||||
modem_state = MM_MODEM_STATE_UNKNOWN;
|
modem_state = MM_MODEM_STATE_UNKNOWN;
|
||||||
g_object_get (self,
|
g_object_get (self,
|
||||||
MM_IFACE_MODEM_STATE, &modem_state,
|
MM_IFACE_MODEM_STATE, &modem_state,
|
||||||
NULL);
|
NULL);
|
||||||
if (modem_state < MM_MODEM_STATE_ENABLING) {
|
if (modem_state < MM_MODEM_STATE_ENABLED) {
|
||||||
mm_dbg ("Modem %s: 3GPP Registration state change ignored as modem isn't enabled",
|
mm_dbg ("Modem %s: 3GPP Registration state change ignored as modem isn't enabled",
|
||||||
g_dbus_object_get_object_path (G_DBUS_OBJECT (self)));
|
g_dbus_object_get_object_path (G_DBUS_OBJECT (self)));
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user