[bluez] Update patches

Bastien Nocera hadess at fedoraproject.org
Mon Nov 8 16:47:04 UTC 2010


commit 43188cb21ee7755fa3d848c8c3627810cbf3a901
Author: Bastien Nocera <hadess at hadess.net>
Date:   Mon Nov 8 16:46:58 2010 +0000

    Update patches

 0001-Add-sixaxis-cable-pairing-plugin.patch |   14 +++++-----
 0001-Handle-ISO8859-1-device-names.patch    |   38 +++++++++++++++++++++++++++
 bluez-try-utf8-harder.patch                 |   23 ----------------
 bluez.spec                                  |    2 +-
 4 files changed, 46 insertions(+), 31 deletions(-)
---
diff --git a/0001-Add-sixaxis-cable-pairing-plugin.patch b/0001-Add-sixaxis-cable-pairing-plugin.patch
index 706e7ca..83ec928 100644
--- a/0001-Add-sixaxis-cable-pairing-plugin.patch
+++ b/0001-Add-sixaxis-cable-pairing-plugin.patch
@@ -1,4 +1,4 @@
-From 4165e66ef8517cf48e90be7ccb3ba4f4fcd57153 Mon Sep 17 00:00:00 2001
+From e6f125f38cd7e8b69c39ebe3e8d15b417717a254 Mon Sep 17 00:00:00 2001
 From: Bastien Nocera <hadess at hadess.net>
 Date: Tue, 1 Sep 2009 17:32:48 +0100
 Subject: [PATCH] Add sixaxis cable-pairing plugin
@@ -17,7 +17,7 @@ address, and added to the database of the current default adapter.
  create mode 100644 plugins/cable.c
 
 diff --git a/Makefile.am b/Makefile.am
-index 6e8fc7d..8636530 100644
+index 79b13a5..4732707 100644
 --- a/Makefile.am
 +++ b/Makefile.am
 @@ -195,6 +195,11 @@ builtin_sources += health/hdp_main.c health/hdp_types.h \
@@ -29,12 +29,12 @@ index 6e8fc7d..8636530 100644
 +builtin_sources += plugins/cable.c
 +endif
 +
- builtin_modules += hciops
- builtin_sources += plugins/hciops.c
+ builtin_modules += hciops mgmtops
+ builtin_sources += plugins/hciops.c plugins/mgmtops.c
  
 @@ -240,7 +245,7 @@ src_bluetoothd_SOURCES = $(gdbus_sources) $(builtin_sources) \
  			src/dbus-common.c src/dbus-common.h \
- 			src/dbus-hci.h src/dbus-hci.c
+ 			src/event.h src/event.c
  src_bluetoothd_LDADD = lib/libbluetooth.la @GLIB_LIBS@ @DBUS_LIBS@ \
 -							@CAPNG_LIBS@ -ldl -lrt
 +							@CAPNG_LIBS@ @CABLE_LIBS@ -ldl -lrt
@@ -104,7 +104,7 @@ index 287f07d..aab0c15 100644
 +	AM_CONDITIONAL(CABLE, test "${cable_enable}" = "yes" && test "${cable_found}" = "yes")
  ])
 diff --git a/configure.ac b/configure.ac
-index 13a154c..59b0693 100644
+index ace1d5f..b3c8d30 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -40,6 +40,7 @@ AC_PATH_GLIB
@@ -507,5 +507,5 @@ index 0000000..d74c771
 +BLUETOOTH_PLUGIN_DEFINE(cable, VERSION,
 +			BLUETOOTH_PLUGIN_PRIORITY_DEFAULT, cable_init, cable_exit)
 -- 
-1.7.3.1
+1.7.3.2
 
diff --git a/0001-Handle-ISO8859-1-device-names.patch b/0001-Handle-ISO8859-1-device-names.patch
new file mode 100644
index 0000000..7b34142
--- /dev/null
+++ b/0001-Handle-ISO8859-1-device-names.patch
@@ -0,0 +1,38 @@
+From 29efb2e97955c2e236410930fa8b913bf243d72b Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess at hadess.net>
+Date: Mon, 8 Nov 2010 16:43:42 +0000
+Subject: [PATCH] Handle ISO8859-1 device names
+
+http://thread.gmane.org/gmane.linux.bluez.kernel/1687
+https://bugzilla.redhat.com/show_bug.cgi?id=450081
+---
+ src/event.c |   13 ++++++++++---
+ 1 files changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/src/event.c b/src/event.c
+index e943c63..530004d 100644
+--- a/src/event.c
++++ b/src/event.c
+@@ -488,9 +488,16 @@ void btd_event_remote_name(bdaddr_t *local, bdaddr_t *peer, uint8_t status,
+ 
+ 		/* It's ok to cast end between const and non-const since
+ 		 * we know it points to inside of name which is non-const */
+-		if (!g_utf8_validate(name, -1, (const char **) &end))
+-			*end = '\0';
+-
++		if (!g_utf8_validate(name, -1, (const char **) &end)) {
++			char *utf8_name;
++
++			utf8_name = g_convert(name, -1, "UTF-8", "ISO-8859-1", NULL, NULL, NULL);
++			if (utf8_name) {
++				memcpy(name, utf8_name, 248);
++				g_free(utf8_name);
++			} else
++				*end = '\0';
++		}
+ 		write_device_name(local, peer, name);
+ 	}
+ 
+-- 
+1.7.3.2
+
diff --git a/bluez.spec b/bluez.spec
index 6d1302e..1544424 100644
--- a/bluez.spec
+++ b/bluez.spec
@@ -14,7 +14,7 @@ Source8: bluez-uinput.modules
 
 # https://bugzilla.redhat.com/show_bug.cgi?id=450081
 # http://thread.gmane.org/gmane.linux.bluez.kernel/1687
-Patch2: bluez-try-utf8-harder.patch
+Patch2: 0001-Handle-ISO8859-1-device-names.patch
 # https://bugzilla.redhat.com/show_bug.cgi?id=498756
 Patch4: bluez-socket-mobile-cf-connection-kit.patch
 # http://thread.gmane.org/gmane.linux.bluez.kernel/2396


More information about the scm-commits mailing list