From fb66cc26beaa8ee4b48040ea938043bb5919b273 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Mon, 4 Sep 2023 17:23:30 +0000 Subject: [PATCH] iface-modem: ignore UNKNOWN modem state explicitly during wait operation --- src/mm-iface-modem.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c index ed326adb..63902025 100644 --- a/src/mm-iface-modem.c +++ b/src/mm-iface-modem.c @@ -404,6 +404,10 @@ state_changed (MMIfaceModem *self, MM_IFACE_MODEM_STATE, &state, NULL); + /* Ignore unknown state explicitly during a wait operation */ + if (state == MM_MODEM_STATE_UNKNOWN) + return; + /* Are we in a final state already? */ if (MODEM_STATE_IS_INTERMEDIATE (state)) return; @@ -413,7 +417,6 @@ state_changed (MMIfaceModem *self, /* If we want a specific final state and this is not the one we were * looking for, then skip */ if (ctx->final_state != MM_MODEM_STATE_UNKNOWN && - state != MM_MODEM_STATE_UNKNOWN && state != ctx->final_state) return;