Author: patrys Date: Wed Jun 10 14:41:59 2009 GMT Module: packages Tag: HEAD ---- Log message: - add patches to prevent bluetoothd from crashing
---- Files affected: packages/bluez: bluez.spec (1.25 -> 1.26) , bluez-bt_cancel_discovery.patch (NONE -> 1.1) (NEW), bluez-null-session.patch (NONE -> 1.1) (NEW) ---- Diffs: ================================================================ Index: packages/bluez/bluez.spec diff -u packages/bluez/bluez.spec:1.25 packages/bluez/bluez.spec:1.26 --- packages/bluez/bluez.spec:1.25 Tue Jun 9 17:59:38 2009 +++ packages/bluez/bluez.spec Wed Jun 10 16:41:53 2009 @@ -3,7 +3,7 @@ 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 @@ -15,6 +15,8 @@ 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 @@ -170,6 +172,8 @@ %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 +%patch3 -p1 %build %{__libtoolize} @@ -303,6 +307,9 @@ All persons listed below can be reached at <cvs_login>@pld-linux.org $Log$ +Revision 1.26 2009/06/10 14:41:53 patrys +- add patches to prevent bluetoothd from crashing + Revision 1.25 2009/06/09 15:59:38 charles - updated to 4.41 - BR: libnl-devel (--enable-netlink) ================================================================ Index: packages/bluez/bluez-bt_cancel_discovery.patch diff -u /dev/null packages/bluez/bluez-bt_cancel_discovery.patch:1.1 --- /dev/null Wed Jun 10 16:41:59 2009 +++ packages/bluez/bluez-bt_cancel_discovery.patch Wed Jun 10 16:41:53 2009 @@ -0,0 +1,26 @@ +From: Johan Hedberg <[email protected]> +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); + } ================================================================ Index: packages/bluez/bluez-null-session.patch diff -u /dev/null packages/bluez/bluez-null-session.patch:1.1 --- /dev/null Wed Jun 10 16:41:59 2009 +++ packages/bluez/bluez-null-session.patch Wed Jun 10 16:41:53 2009 @@ -0,0 +1,41 @@ +From: Johan Hedberg <[email protected]> +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; ================================================================ ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/bluez/bluez.spec?r1=1.25&r2=1.26&f=u _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
