aboutsummaryrefslogtreecommitdiff
path: root/src/mm-modem-helpers.c
diff options
context:
space:
mode:
authorDan Williams <dan@ioncontrol.co>2025-05-08 19:54:43 -0500
committerDan Williams <dan@ioncontrol.co>2025-05-08 19:54:43 -0500
commitbf416a7462d1cde66dee213d858dd2b8d06f042a (patch)
tree3bcad5021316a3d55758da80310f3ffa738ea4e2 /src/mm-modem-helpers.c
parent27384681a7300955bab234cdbea5ceb075245ef6 (diff)
parent4d2d01b2c6a0819d941a4ef2d257e5392af3e24f (diff)
Merge request !1310 from 'disabled-profiles'
bearer: don't choose or activate disabled profiles https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1310
Diffstat (limited to 'src/mm-modem-helpers.c')
-rw-r--r--src/mm-modem-helpers.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mm-modem-helpers.c b/src/mm-modem-helpers.c
index 574ec7fc..fcb44ad2 100644
--- a/src/mm-modem-helpers.c
+++ b/src/mm-modem-helpers.c
@@ -1677,6 +1677,12 @@ mm_3gpp_profile_list_find_best (GList *profile_list,
continue;
}
+ /* Never select disabled profiles */
+ if (!mm_3gpp_profile_get_enabled (iter_profile)) {
+ mm_obj_dbg (log_object, "skipping context at profile %d: disabled", iter_profile_id);
+ continue;
+ }
+
/* Always prefer an exact match; compare all supported fields except for profile id */
if (mm_3gpp_profile_cmp (iter_profile, requested, cmp_apn, cmp_flags)) {
mm_obj_dbg (log_object, "found exact context at profile %d", iter_profile_id);