From 4a36f50de89cc8deee3dd5bc4e34e5a186339fdf Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Mon, 26 Sep 2022 08:49:47 +0000 Subject: [PATCH] iface-modem-3gpp-profile-manager: fix requested IP type normalization mm_iface_modem_3gpp_profile_manager_set_profile() was changed so that the input profile object was not touched, and instead a copy of the same would be used within the method. Unfortunately, that change missed the update of the IP type normalization step, which would end up modifying the original settings instead of the newly created copy. Fixes 7464940971ded3d550217872b42fef9f3120b1bf --- src/mm-iface-modem-3gpp-profile-manager.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mm-iface-modem-3gpp-profile-manager.c b/src/mm-iface-modem-3gpp-profile-manager.c index 999273e1..36c850e1 100644 --- a/src/mm-iface-modem-3gpp-profile-manager.c +++ b/src/mm-iface-modem-3gpp-profile-manager.c @@ -699,8 +699,8 @@ mm_iface_modem_3gpp_profile_manager_set_profile (MMIfaceModem3gppProfileManager ctx->requested = g_object_ref (requested_copy); ctx->index_field = g_strdup (index_field); ctx->strict = strict; - ctx->profile_id = mm_3gpp_profile_get_profile_id (requested); - ctx->apn_type = mm_3gpp_profile_get_apn_type (requested); + ctx->profile_id = mm_3gpp_profile_get_profile_id (ctx->requested); + ctx->apn_type = mm_3gpp_profile_get_apn_type (ctx->requested); ctx->apn_type_str = mm_bearer_apn_type_build_string_from_mask (ctx->apn_type); g_task_set_task_data (task, ctx, (GDestroyNotify)set_profile_context_free); @@ -725,9 +725,9 @@ mm_iface_modem_3gpp_profile_manager_set_profile (MMIfaceModem3gppProfileManager g_assert_not_reached (); /* normalize IP family right away */ - ip_family = mm_3gpp_profile_get_ip_type (requested); + ip_family = mm_3gpp_profile_get_ip_type (ctx->requested); mm_3gpp_normalize_ip_family (&ip_family); - mm_3gpp_profile_set_ip_type (requested, ip_family); + mm_3gpp_profile_set_ip_type (ctx->requested, ip_family); set_profile_step (task); }