summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2009-02-17 18:23:32 -0300
committerJohan Hedberg <johan.hedberg@nokia.com>2009-02-19 09:17:36 +0200
commit501b5d1a8afbaa56761dd5473e8d5169997b71dd (patch)
treed4c886904e6eb73524e0824ce9bf90642bf1b81d /audio
parent46b71a7f3f5cde36bef4c9d3c0f1cb5754e0bd45 (diff)
Make probe to fail if avdtp_init fail.
Diffstat (limited to 'audio')
-rw-r--r--audio/a2dp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/audio/a2dp.c b/audio/a2dp.c
index e07a34a2..3ce255e8 100644
--- a/audio/a2dp.c
+++ b/audio/a2dp.c
@@ -1122,10 +1122,16 @@ proceed:
server = find_server(servers, src);
if (!server) {
+ int av_err;
+
server = g_new0(struct a2dp_server, 1);
if (!server)
return -ENOMEM;
- avdtp_init(src, config);
+
+ av_err = avdtp_init(src, config);
+ if (av_err < 0)
+ return av_err;
+
bacpy(&server->src, src);
servers = g_slist_append(servers, server);
}