From ede18c82399812eef214866704174490b426b27a Mon Sep 17 00:00:00 2001 From: Felipe Borges Date: Tue, 21 Jan 2025 15:03:43 +0100 Subject: [PATCH] Handle gsm_sim virtual modems Related: RHEL-4193 --- gnome-control-center.spec | 11 ++++-- wwan-handle-gsm_sim_virtual-modems.patch | 45 ++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 wwan-handle-gsm_sim_virtual-modems.patch diff --git a/gnome-control-center.spec b/gnome-control-center.spec index d02ff7c..d946d8b 100644 --- a/gnome-control-center.spec +++ b/gnome-control-center.spec @@ -14,7 +14,7 @@ Name: gnome-control-center Version: 40.0 -Release: 38%{?dist} +Release: 39%{?dist} Summary: Utilities to configure the GNOME desktop License: GPLv2+ and CC-BY-SA @@ -60,7 +60,7 @@ Patch16: background-solid-colors.patch Patch17: 0001-wacom-Group-devices-using-libwacom-API-too.patch -# Needs Jira ticket +# https://issues.redhat.com/browse/RHEL-71937 Patch18: power-button-action-server.patch # https://issues.redhat.com/browse/RHEL-50729 @@ -72,6 +72,9 @@ Patch20: keyboard-dont-force-compose-key-value.patch # https://issues.redhat.com/browse/RHEL-4196 Patch21: display-draw-larger-monitors-when-multiple.patch +# https://issues.redhat.com/browse/RHEL-4193 +Patch22: wwan-handle-gsm_sim_virtual-modems.patch + BuildRequires: chrpath BuildRequires: cups-devel BuildRequires: desktop-file-utils @@ -261,6 +264,10 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/gnome-control-center %dir %{_datadir}/gnome/wm-properties %changelog +* Thu Feb 27 2025 Felipe Borges - 40.0-39 +- Handle gsm_sim virtual modems in Mobile Networks settings + Resolves: RHEL-4193 + * Thu Jan 23 2025 Felipe Borges - 40.0-38 - Scale up monitors drawing in display arrangment settings when multiple monitors Related: RHEL-4196 diff --git a/wwan-handle-gsm_sim_virtual-modems.patch b/wwan-handle-gsm_sim_virtual-modems.patch new file mode 100644 index 0000000..7cd3a10 --- /dev/null +++ b/wwan-handle-gsm_sim_virtual-modems.patch @@ -0,0 +1,45 @@ +From dad011062bb9f6bfa6751c43964f718e676014f3 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Wed, 8 Jun 2022 13:24:49 +0200 +Subject: [PATCH] wwan: do not insist SIM ID being present + +It is perfectly possible for mm_sim_dup_identifier() to return NULL if +the SIM ID wasn't provided by the modem for any reason, leading to an +assertion failure: + + (gnome-control-center:910641): cc-wwan-data-CRITICAL **: 12:43:51.573: + cc_wwan_data_set_default_apn: assertion 'self->sim_id != NULL' failed + +Handle the NULL SIM ID gracefully. +--- + panels/wwan/cc-wwan-data.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/panels/wwan/cc-wwan-data.c b/panels/wwan/cc-wwan-data.c +index ca54c731fd..3bb7ad78ff 100644 +--- a/panels/wwan/cc-wwan-data.c ++++ b/panels/wwan/cc-wwan-data.c +@@ -1024,7 +1024,6 @@ cc_wwan_data_set_default_apn (CcWwanData *self, + + g_return_val_if_fail (CC_IS_WWAN_DATA (self), FALSE); + g_return_val_if_fail (CC_IS_WWAN_DATA_APN (apn), FALSE); +- g_return_val_if_fail (self->sim_id != NULL, FALSE); + + if (self->default_apn == apn) + return FALSE; +@@ -1040,8 +1039,10 @@ cc_wwan_data_set_default_apn (CcWwanData *self, + self->default_apn = apn; + connection = wwan_data_get_nm_connection (apn); + setting = NM_SETTING (nm_connection_get_setting_gsm (connection)); +- g_object_set (G_OBJECT (setting), +- NM_SETTING_GSM_SIM_ID, self->sim_id, NULL); ++ ++ if (self->sim_id) ++ g_object_set (G_OBJECT (setting), ++ NM_SETTING_GSM_SIM_ID, self->sim_id, NULL); + + return TRUE; + } +-- +GitLab +