From d82f0d5371ad9fde50bfa21976af0b9bc7a6d663 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Fri, 29 Jul 2022 17:24:30 +0200 Subject: [PATCH] iface-modem-simple: wait for packet service state is 3GPP specific --- src/mm-iface-modem-simple.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/mm-iface-modem-simple.c b/src/mm-iface-modem-simple.c index fcf959ca..d4490f23 100644 --- a/src/mm-iface-modem-simple.c +++ b/src/mm-iface-modem-simple.c @@ -317,9 +317,9 @@ create_bearer_ready (MMIfaceModem *self, } static void -wait_for_packet_service_attach_ready (MMIfaceModem3gpp *self, - GAsyncResult *res, - ConnectionContext *ctx) +wait_for_packet_service_state_ready (MMIfaceModem3gpp *self, + GAsyncResult *res, + ConnectionContext *ctx) { GError *error = NULL; @@ -624,11 +624,16 @@ connection_step (ConnectionContext *ctx) case CONNECTION_STEP_PACKET_SERVICE_ATTACH: mm_obj_info (ctx->self, "simple connect state (%d/%d): wait to get packet service state attached", ctx->step, CONNECTION_STEP_LAST); - mm_iface_modem_3gpp_wait_for_packet_service_state (MM_IFACE_MODEM_3GPP (ctx->self), - MM_MODEM_3GPP_PACKET_SERVICE_STATE_ATTACHED, /* attached state */ - (GAsyncReadyCallback)wait_for_packet_service_attach_ready, - ctx); - return; + if (mm_iface_modem_is_3gpp (MM_IFACE_MODEM (ctx->self))) { + mm_iface_modem_3gpp_wait_for_packet_service_state (MM_IFACE_MODEM_3GPP (ctx->self), + MM_MODEM_3GPP_PACKET_SERVICE_STATE_ATTACHED, + (GAsyncReadyCallback)wait_for_packet_service_state_ready, + ctx); + return; + } + /* If not 3GPP, just go on */ + ctx->step++; + /* fall through */ case CONNECTION_STEP_BEARER: { g_autoptr(MMBearerProperties) bearer_properties = NULL;