From ae02c47634141c532db62559d1b5baa5048f70cd Mon Sep 17 00:00:00 2001 From: Ujjwal Pande Date: Wed, 4 Oct 2023 18:27:43 +0000 Subject: ModemManager: Add force option to set initial EPS bearer settings Adding a new force option to force send initial EPS bearer settings to modem even if they match the existing ones. Currently settings are not sent to the modem if they match old settings --- src/mm-iface-modem-3gpp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mm-iface-modem-3gpp.c b/src/mm-iface-modem-3gpp.c index 0261c215..0e3cf697 100644 --- a/src/mm-iface-modem-3gpp.c +++ b/src/mm-iface-modem-3gpp.c @@ -1300,6 +1300,7 @@ set_initial_eps_bearer_settings_auth_ready (MMBaseModem GAsyncResult *res, HandleSetInitialEpsBearerSettingsContext *ctx) { + gboolean force = FALSE; GError *error = NULL; GVariant *old_dictionary; g_autoptr(MMBearerProperties) old_config = NULL; @@ -1326,14 +1327,16 @@ set_initial_eps_bearer_settings_auth_ready (MMBaseModem return; } - mm_obj_info (self, "processing user request to set initial EPS bearer settings..."); + force = mm_bearer_properties_get_force (ctx->config); + mm_obj_info (self, "processing user request to set initial EPS bearer settings%s...", force ? " (forced)" : ""); + mm_log_bearer_properties (self, MM_LOG_LEVEL_INFO, " ", ctx->config); old_dictionary = mm_gdbus_modem3gpp_get_initial_eps_bearer_settings (ctx->skeleton); if (old_dictionary) old_config = mm_bearer_properties_new_from_dictionary (old_dictionary, NULL); - if (old_config && mm_bearer_properties_cmp (ctx->config, old_config, MM_BEARER_PROPERTIES_CMP_FLAGS_EPS)) { + if (!force && old_config && mm_bearer_properties_cmp (ctx->config, old_config, MM_BEARER_PROPERTIES_CMP_FLAGS_EPS)) { mm_obj_info (self, "skipped setting initial EPS bearer settings: same configuration provided"); mm_gdbus_modem3gpp_complete_set_initial_eps_bearer_settings (ctx->skeleton, ctx->invocation); handle_set_initial_eps_bearer_settings_context_free (ctx); -- cgit v1.2.3-70-g09d2