From 499cdf79dcd54a0ad00bff9d4525bdb291ef840e Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Wed, 16 Feb 2022 12:51:25 +0100 Subject: [PATCH] fibocom: initial EPS settings update always available in parent Assume that the method to change the initial EPS bearer settings is always implemented in the parent, so that we can avoid the runtime check. This also fixes the codepath that would happen if the iface_modem_3gpp_parent->set_initial_eps_bearer_settings == NULL condition was valid, as that would end up with a GTask never completed. --- .../mm-broadband-modem-mbim-xmm-fibocom.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/fibocom/mm-broadband-modem-mbim-xmm-fibocom.c b/plugins/fibocom/mm-broadband-modem-mbim-xmm-fibocom.c index d1f2e069..3a475678 100755 --- a/plugins/fibocom/mm-broadband-modem-mbim-xmm-fibocom.c +++ b/plugins/fibocom/mm-broadband-modem-mbim-xmm-fibocom.c @@ -102,14 +102,14 @@ before_attach_apn_modem_power_down_ready (MMIfaceModem *self, } mm_obj_dbg (self, "success toggling modem power down before attach APN"); - if (iface_modem_3gpp_parent->set_initial_eps_bearer_settings && - iface_modem_3gpp_parent->set_initial_eps_bearer_settings_finish) { - iface_modem_3gpp_parent->set_initial_eps_bearer_settings (MM_IFACE_MODEM_3GPP (self), - config, - (GAsyncReadyCallback)parent_set_initial_eps_bearer_settings_ready, - task); - return; - } + + g_assert (iface_modem_3gpp_parent->set_initial_eps_bearer_settings); + g_assert (iface_modem_3gpp_parent->set_initial_eps_bearer_settings_finish); + + iface_modem_3gpp_parent->set_initial_eps_bearer_settings (MM_IFACE_MODEM_3GPP (self), + config, + (GAsyncReadyCallback)parent_set_initial_eps_bearer_settings_ready, + task); } static void