aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-10-24 16:22:55 +0200
committerAleksander Morgado <aleksander@lanedo.com>2012-10-30 15:35:33 +0100
commitf667898ecac27906fae9dfa526b799b0c81221f6 (patch)
tree6815860ee209feaae5c43b24bee43209f0249edc /src
parentdb80fd25509ca9c9cf56d57d1e4de637a859c0cd (diff)
iface-modem: ignore registration-related state changes if enabling or disabling
Diffstat (limited to 'src')
-rw-r--r--src/mm-iface-modem.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c
index 873ad6f7..12cdd602 100644
--- a/src/mm-iface-modem.c
+++ b/src/mm-iface-modem.c
@@ -1329,11 +1329,22 @@ mm_iface_modem_update_subsystem_state (MMIfaceModem *self,
MMModemStateChangeReason reason)
{
MMModemState consolidated;
+ MMModemState state = MM_MODEM_STATE_UNKNOWN;
+
+ g_object_get (self,
+ MM_IFACE_MODEM_STATE, &state,
+ NULL);
/* We may have different subsystems being handled (e.g. 3GPP and CDMA), and
* the registration status value is unique, so if we get subsystem-specific
* state updates, we'll need to merge all to get a consolidated one. */
consolidated = get_updated_consolidated_state (self, subsystem, new_state);
+
+ /* Don't update registration-related states while disabling/enabling */
+ if (state == MM_MODEM_STATE_ENABLING ||
+ state == MM_MODEM_STATE_DISABLING)
+ return;
+
mm_iface_modem_update_state (self, consolidated, reason);
}