[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.19-216-g2dc37e1

Lennart Poettering gitmailer-noreply at 0pointer.de
Fri Oct 30 18:05:34 PDT 2009


This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.

The master branch has been updated
      from  b83d7a27cee4a436e4d692a9bba1b426090f4d12 (commit)

- Log -----------------------------------------------------------------
2dc37e1 bluetooth: do not hand out access to devices that are not fully configured yet
-----------------------------------------------------------------------

Summary of changes:
 src/modules/bluetooth/bluetooth-util.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

-----------------------------------------------------------------------

commit 2dc37e1214f20aab528ae680e9a85fc8ea143313
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sat Oct 31 02:05:54 2009 +0100

    bluetooth: do not hand out access to devices that are not fully configured yet

diff --git a/src/modules/bluetooth/bluetooth-util.c b/src/modules/bluetooth/bluetooth-util.c
index f8c5b77..47d6200 100644
--- a/src/modules/bluetooth/bluetooth-util.c
+++ b/src/modules/bluetooth/bluetooth-util.c
@@ -723,12 +723,14 @@ const pa_bluetooth_device* pa_bluetooth_discovery_get_by_address(pa_bluetooth_di
 
     while ((d = pa_hashmap_iterate(y->devices, &state, NULL)))
         if (pa_streq(d->address, address))
-            return d;
+            return device_is_audio(d) ? d : NULL;
 
     return NULL;
 }
 
 const pa_bluetooth_device* pa_bluetooth_discovery_get_by_path(pa_bluetooth_discovery *y, const char* path) {
+    pa_bluetooth_device *d;
+
     pa_assert(y);
     pa_assert(PA_REFCNT_VALUE(y) > 0);
     pa_assert(path);
@@ -736,7 +738,11 @@ const pa_bluetooth_device* pa_bluetooth_discovery_get_by_path(pa_bluetooth_disco
     if (!pa_hook_is_firing(&y->hook))
         pa_bluetooth_discovery_sync(y);
 
-    return pa_hashmap_get(y->devices, path);
+    if ((d = pa_hashmap_get(y->devices, path)))
+        if (device_is_audio(d))
+            return d;
+
+    return NULL;
 }
 
 static int setup_dbus(pa_bluetooth_discovery *y) {

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list