Thread (10 messages) flat view 10 messages, 3 authors, 2012-01-26

Re: Changed default configuration in bluez 4.97 and higher?

From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Date: 2012-01-26 17:13:26
Subsystem: the rest · Maintainer: Linus Torvalds

Hi Karol,

On Thu, Jan 26, 2012 at 6:22 PM, Karol Babioch [off-list ref] wrote:
Hi,

Am 26.01.2012 16:17, schrieb Luiz Augusto von Dentz:
quoted
can you check if you get
anything on bluetoothd logs like this:
I'm attaching my logs (with -d enabled) here. Hopefully they are not too
long. As you can see, the discovery works just fine, but I can't see any
registration of an endpoint, like you proposed.
Thanks for the log, Ive figure out the problem, here is a patch that
might fix it (also attached):
diff --git a/audio/a2dp.c b/audio/a2dp.c
index c4cdc62..2eebe6b 100644
--- a/audio/a2dp.c
+++ b/audio/a2dp.c
@@ -1441,9 +1441,9 @@ static struct a2dp_server *find_server(GSList
*list, const bdaddr_t *src)

 int a2dp_register(DBusConnection *conn, const bdaddr_t *src, GKeyFile *config)
 {
-       int sbc_srcs = 1, sbc_sinks = 1;
+       int sbc_srcs = 0, sbc_sinks = 0;
        int mpeg12_srcs = 0, mpeg12_sinks = 0;
-       gboolean source = TRUE, sink = FALSE, socket = TRUE;
+       gboolean source = TRUE, sink = FALSE, socket = FALSE;
        gboolean delay_reporting = FALSE;
        char *str;
        GError *err = NULL;
@@ -1463,6 +1463,8 @@ int a2dp_register(DBusConnection *conn, const
bdaddr_t *src, GKeyFile *config)
                        source = TRUE;
                if (strstr(str, "Source"))
                        sink = TRUE;
+               if (strstr(str, "Socket"))
+                       socket = TRUE;
                g_free(str);
        }
@@ -1482,18 +1484,14 @@ int a2dp_register(DBusConnection *conn, const
bdaddr_t *src, GKeyFile *config)
        }

        /* Don't register any local sep if Socket is disabled */
-       if (socket == FALSE) {
-               sbc_srcs = 0;
-               sbc_sinks = 0;
-               mpeg12_srcs = 0;
-               mpeg12_sinks = 0;
:

Basically the problem is that the code is assuming that Socket is
enabled by default which is not true anymore.

-- 
Luiz Augusto von Dentz

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help