* [PATCH BlueZ] audio: fix not disabling local a2dp endpoints when unix socket is disabled
@ 2012-01-26 21:39 Luiz Augusto von Dentz
2012-01-27 10:31 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2012-01-26 21:39 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Local endpoints can only be used when unix socket API is available
---
audio/a2dp.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
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;
+ if (socket == FALSE)
goto proceed;
- }
str = g_key_file_get_string(config, "A2DP", "SBCSources", &err);
if (err) {
DBG("audio.conf: %s", err->message);
g_clear_error(&err);
+ sbc_srcs = 1;
} else {
sbc_srcs = atoi(str);
g_free(str);
@@ -1512,6 +1510,7 @@ int a2dp_register(DBusConnection *conn, const bdaddr_t *src, GKeyFile *config)
if (err) {
DBG("audio.conf: %s", err->message);
g_clear_error(&err);
+ sbc_sinks = 1;
} else {
sbc_sinks = atoi(str);
g_free(str);
--
1.7.7.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH BlueZ] audio: fix not disabling local a2dp endpoints when unix socket is disabled
2012-01-26 21:39 [PATCH BlueZ] audio: fix not disabling local a2dp endpoints when unix socket is disabled Luiz Augusto von Dentz
@ 2012-01-27 10:31 ` Johan Hedberg
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2012-01-27 10:31 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hi Luiz,
On Thu, Jan 26, 2012, Luiz Augusto von Dentz wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> Local endpoints can only be used when unix socket API is available
> ---
> audio/a2dp.c | 15 +++++++--------
> 1 files changed, 7 insertions(+), 8 deletions(-)
Applied. Thanks.
Johan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-27 10:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-26 21:39 [PATCH BlueZ] audio: fix not disabling local a2dp endpoints when unix socket is disabled Luiz Augusto von Dentz
2012-01-27 10:31 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).