iface-modem-3gpp: ignore UNKNOWN ps state explicitly during wait operation

This commit is contained in:
Aleksander Morgado
2023-09-04 17:26:41 +00:00
committed by Aleksander Morgado
parent fb66cc26be
commit 5adda62912

View File

@@ -244,12 +244,15 @@ packet_service_state_changed (MMIfaceModem3gpp *self,
MM_IFACE_MODEM_3GPP_PACKET_SERVICE_STATE, &state, MM_IFACE_MODEM_3GPP_PACKET_SERVICE_STATE, &state,
NULL); NULL);
/* Ignore unknown state explicitly during a wait operation */
if (state == MM_MODEM_3GPP_PACKET_SERVICE_STATE_UNKNOWN)
return;
ctx = g_task_get_task_data (task); ctx = g_task_get_task_data (task);
/* If we want a specific final state and this is not the one we were /* If we want a specific final state and this is not the one we were
* looking for, then skip */ * looking for, then skip */
if ((ctx->final_state != MM_MODEM_3GPP_PACKET_SERVICE_STATE_UNKNOWN) && if ((ctx->final_state != MM_MODEM_3GPP_PACKET_SERVICE_STATE_UNKNOWN) &&
(state != MM_MODEM_3GPP_PACKET_SERVICE_STATE_UNKNOWN) &&
(state != ctx->final_state)) (state != ctx->final_state))
return; return;