[control-center/f18] Don't crash on unknown rfkill types

drago01 drago01 at fedoraproject.org
Thu May 16 13:54:55 UTC 2013


commit 77c6d472bb6af870c72c11f0a256c80e34a9781e
Author: Adel Gadllah <adel.gadllah at gmail.com>
Date:   Thu May 16 15:54:44 2013 +0200

    Don't crash on unknown rfkill types

 ...-Don-t-use-g_assert_not_reached-in-type_t.patch |   27 ++++++++++++++++++++
 control-center.spec                                |    7 ++++-
 2 files changed, 33 insertions(+), 1 deletions(-)
---
diff --git a/0001-rfkill-glib-Don-t-use-g_assert_not_reached-in-type_t.patch b/0001-rfkill-glib-Don-t-use-g_assert_not_reached-in-type_t.patch
new file mode 100644
index 0000000..4032d64
--- /dev/null
+++ b/0001-rfkill-glib-Don-t-use-g_assert_not_reached-in-type_t.patch
@@ -0,0 +1,27 @@
+From d6324420a5626f4ceccb9b35dcd9647c27c5c020 Mon Sep 17 00:00:00 2001
+From: Adel Gadllah <adel.gadllah at gmail.com>
+Date: Thu, 16 May 2013 15:41:17 +0200
+Subject: [PATCH] rfkill-glib: Don't use g_assert_not_reached in type_to_string
+
+New kernel versions can add new RFKILL types, we should now crash here,
+just say that we don't know what the switch is.
+---
+ panels/network/rfkill-glib.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/panels/network/rfkill-glib.c b/panels/network/rfkill-glib.c
+index e27ca40..7c9ee3c 100644
+--- a/panels/network/rfkill-glib.c
++++ b/panels/network/rfkill-glib.c
+@@ -80,7 +80,7 @@ type_to_string (unsigned int type)
+ 	case RFKILL_TYPE_WWAN:
+ 		return "WWAN";
+ 	default:
+-		g_assert_not_reached ();
++		return "UNKNOWN";
+ 	}
+ }
+ 
+-- 
+1.8.1.4
+
diff --git a/control-center.spec b/control-center.spec
index 5d53434..2a46a04 100644
--- a/control-center.spec
+++ b/control-center.spec
@@ -12,7 +12,7 @@
 Summary: Utilities to configure the GNOME desktop
 Name: control-center
 Version: 3.6.3
-Release: 1%{?dist}
+Release: 2%{?dist}
 Epoch: 1
 License: GPLv2+ and GFDL
 #VCS: git:git://git.gnome.org/gnome-control-center
@@ -22,6 +22,7 @@ URL: http://www.gnome.org
 # Wacom OSD window
 # https://bugzilla.gnome.org/show_bug.cgi?id=683567
 Patch1: 0001-wacom-Add-show-help-window-to-the-list-of-actions.patch
+Patch2: 0001-rfkill-glib-Don-t-use-g_assert_not_reached-in-type_t.patch
 
 Requires: gnome-settings-daemon >= %{gsd_version}
 Requires: redhat-menus >= %{redhat_menus_version}
@@ -127,6 +128,7 @@ utilities.
 %prep
 %setup -q -n gnome-control-center-%{version}
 %patch1 -p1 -b .wacom-osd-window
+%patch2 -p1 -b .rfkill-unknown
 
 %build
 %configure \
@@ -243,6 +245,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
 
 %changelog
+* Thu May 16 2013 Adel Gadllah <adel.gadllah at gmail.com> - 1:3.6.3-2
+- Don't crash on unknown rfkill types
+
 * Wed Nov 14 2012 Kalev Lember <kalevlember at gmail.com> - 1:3.6.3-1
 - Update to 3.6.3
 


More information about the scm-commits mailing list