iface-modem: ensure error is set when UNKNOWN returned in modem state wait
This commit is contained in:

committed by
Aleksander Morgado

parent
5adda62912
commit
c1382b3255
@@ -377,6 +377,9 @@ mm_iface_modem_wait_for_final_state_finish (MMIfaceModem *self,
|
|||||||
g_propagate_error (error, inner_error);
|
g_propagate_error (error, inner_error);
|
||||||
return MM_MODEM_STATE_UNKNOWN;
|
return MM_MODEM_STATE_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
if (value == MM_MODEM_STATE_UNKNOWN)
|
||||||
|
g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED,
|
||||||
|
"Unknown modem state");
|
||||||
return (MMModemState)value;
|
return (MMModemState)value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user