diff options
author | Ujjwal Pande <ujjwalpande@google.com> | 2023-10-04 18:27:43 +0000 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2023-10-11 14:07:53 +0000 |
commit | ae02c47634141c532db62559d1b5baa5048f70cd (patch) | |
tree | 8726e5e6a9536c0e5161ef354d5b126d887f3a27 /src | |
parent | b7433b4c1499dbdbd7eac10a4ff2111fd4fdd6f4 (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-iface-modem-3gpp.c | 7 |
1 files changed, 5 insertions, 2 deletions
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); |