]> git.pld-linux.org Git - packages/bluez.git/commitdiff
- add patches to prevent bluetoothd from crashing auto/th/bluez-4_41-2 auto/ti/bluez-4_41-2
authorPatryk Zawadzki <patrys@room-303.com>
Wed, 10 Jun 2009 14:41:53 +0000 (14:41 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    bluez-bt_cancel_discovery.patch -> 1.1
    bluez-null-session.patch -> 1.1
    bluez.spec -> 1.26

bluez-bt_cancel_discovery.patch [new file with mode: 0644]
bluez-null-session.patch [new file with mode: 0644]
bluez.spec

diff --git a/bluez-bt_cancel_discovery.patch b/bluez-bt_cancel_discovery.patch
new file mode 100644 (file)
index 0000000..e9bd781
--- /dev/null
@@ -0,0 +1,26 @@
+From: Johan Hedberg <johan.hedberg@nokia.com>
+Date: Mon, 8 Jun 2009 04:06:33 +0000 (+0700)
+Subject: Fix bt_cancel_discovery calls in case of SDP failures
+X-Git-Url: http://git.kernel.org/?p=bluetooth%2Fbluez.git;a=commitdiff_plain;h=9d7f87e0e8693b3645da5d66dec736d1ee3e9359
+
+Fix bt_cancel_discovery calls in case of SDP failures
+
+We shouldn't call bt_cancel_discovery if we're withing a SDP callback so
+always make sure that p->svclass is 0 before calling
+pending_connect_finalize (which uses this value to determine whether
+cancelation is needed). The glib-helper.c code should still safeguard
+against this too and that's what the previous commit fixes.
+---
+
+diff --git a/audio/headset.c b/audio/headset.c
+index 7e689ff..86cce52 100644
+--- a/audio/headset.c
++++ b/audio/headset.c
+@@ -1456,6 +1456,7 @@ failed_not_supported:
+       if (p->msg)
+               error_not_supported(dev->conn, p->msg);
+ failed:
++      p->svclass = 0;
+       pending_connect_finalize(dev);
+       headset_set_state(dev, HEADSET_STATE_DISCONNECTED);
+ }
diff --git a/bluez-null-session.patch b/bluez-null-session.patch
new file mode 100644 (file)
index 0000000..46d91ff
--- /dev/null
@@ -0,0 +1,41 @@
+From: Johan Hedberg <johan.hedberg@nokia.com>
+Date: Mon, 8 Jun 2009 04:03:32 +0000 (+0700)
+Subject: Set ctxt->session to NULL after calling sdp_close on it
+X-Git-Url: http://git.kernel.org/?p=bluetooth%2Fbluez.git;a=commitdiff_plain;h=ce0e301583fce9e4a691fea1a12794c2fb40626c;hp=bbd50bd6e7c2c1e9b519ece0c9c4ff23cc97e363
+
+Set ctxt->session to NULL after calling sdp_close on it
+
+This makes sure that we don't do a double-close in case the user callback
+calls e.g. bt_cancel_discovery.
+---
+
+diff --git a/common/glib-helper.c b/common/glib-helper.c
+index c06b32c..727c55d 100644
+--- a/common/glib-helper.c
++++ b/common/glib-helper.c
+@@ -234,6 +234,7 @@ static gboolean search_process_cb(GIOChannel *chan,
+ failed:
+       if (err) {
+               sdp_close(ctxt->session);
++              ctxt->session = NULL;
+               if (ctxt->cb)
+                       ctxt->cb(NULL, err, ctxt->user_data);
+@@ -290,6 +291,7 @@ static gboolean connect_watch(GIOChannel *chan, GIOCondition cond, gpointer user
+ failed:
+       sdp_close(ctxt->session);
++      ctxt->session = NULL;
+       if (ctxt->cb)
+               ctxt->cb(NULL, -err, ctxt->user_data);
+@@ -395,7 +397,8 @@ int bt_cancel_discovery(const bdaddr_t *src, const bdaddr_t *dst)
+       if (ctxt->io_id)
+               g_source_remove(ctxt->io_id);
+-      sdp_close(ctxt->session);
++      if (ctxt->session)
++              sdp_close(ctxt->session);
+       search_context_cleanup(ctxt);
+       return 0;
index 893230882899c64b046220a22a45ee84ff35bcae..4f1b99179a627b566405891b8d4b4e01b7574e52 100644 (file)
@@ -2,7 +2,7 @@ Summary:        Bluetooth utilities
 Summary(pl.UTF-8):     NarzÄ™dzia Bluetooth
 Name:          bluez
 Version:       4.41
-Release:       1
+Release:       2
 License:       GPL v2+
 Group:         Applications/System
 #Source0Download: http://www.bluez.org/download.html
@@ -14,6 +14,8 @@ Source3:      %{name}-udev.rules
 Source4:       %{name}-udev.script
 Patch0:                %{name}-etc_dir.patch
 Patch1:                %{name}-udev-path.patch
+Patch2:                %{name}-null-session.patch
+Patch3:                %{name}-bt_cancel_discovery.patch
 URL:           http://www.bluez.org/
 BuildRequires: alsa-lib-devel >= 1.0.10-1
 BuildRequires: autoconf >= 2.50
@@ -169,6 +171,8 @@ aplikacji Bluetooth.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 %build
 %{__libtoolize}
This page took 0.092789 seconds and 4 git commands to generate.