core: state -> DISABLED when the modem becomes invalid
This commit is contained in:
@@ -149,6 +149,13 @@ mm_modem_base_set_valid (MMModemBase *self, gboolean new_valid)
|
||||
if (priv->valid != new_valid) {
|
||||
priv->valid = new_valid;
|
||||
g_object_notify (G_OBJECT (self), MM_MODEM_VALID);
|
||||
|
||||
if (!new_valid) {
|
||||
/* If no longer valid, modem must be disabled */
|
||||
mm_modem_set_state (MM_MODEM (self),
|
||||
MM_MODEM_STATE_DISABLED,
|
||||
MM_MODEM_STATE_REASON_NONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user