iface-modem: allow falling back to 'failed' state
Allow mm_iface_modem_update_state() receive 'MM_MODEM_STATE_FAILED', and treat it as any other change to failed state, but with 'MM_MODEM_STATE_FAILED_REASON_UNKNOWN'.
This commit is contained in:
@@ -1249,7 +1249,10 @@ mm_iface_modem_update_state (MMIfaceModem *self,
|
|||||||
MMModemState new_state,
|
MMModemState new_state,
|
||||||
MMModemStateChangeReason reason)
|
MMModemStateChangeReason reason)
|
||||||
{
|
{
|
||||||
g_assert (new_state != MM_MODEM_STATE_FAILED);
|
if (new_state == MM_MODEM_STATE_FAILED) {
|
||||||
|
mm_iface_modem_update_failed_state (self, MM_MODEM_STATE_FAILED_REASON_UNKNOWN);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
__iface_modem_update_state_internal (self, new_state, reason, MM_MODEM_STATE_FAILED_REASON_NONE);
|
__iface_modem_update_state_internal (self, new_state, reason, MM_MODEM_STATE_FAILED_REASON_NONE);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user