aboutsummaryrefslogtreecommitdiff
path: root/src/mm-iface-modem-3gpp-profile-manager.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksandermj@chromium.org>2022-09-26 08:49:47 +0000
committerAleksander Morgado <aleksandermj@chromium.org>2022-09-26 08:49:47 +0000
commit4a36f50de89cc8deee3dd5bc4e34e5a186339fdf (patch)
treeb9d3c77c3746fa1059e565b7f0bde408e147e725 /src/mm-iface-modem-3gpp-profile-manager.c
parent7b0b3e7e48ea32be2f88677f2c6e18cf040815db (diff)
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
Diffstat (limited to 'src/mm-iface-modem-3gpp-profile-manager.c')
-rw-r--r--src/mm-iface-modem-3gpp-profile-manager.c8
1 files 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);
}