summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2008-12-02 09:45:22 -0300
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2008-12-02 09:45:22 -0300
commit4ed78c91a7b89db9c7defc2c69d022ddf844b808 (patch)
tree700ea47bedb42a341df8f91a16f00e2f6e4a0a26
parent901a2c3041df13cbb439eaa719d55131b6cb24c6 (diff)
Check if btd_device_add_uuid succeeded.
-rw-r--r--audio/manager.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/audio/manager.c b/audio/manager.c
index 8661dcca..453e2731 100644
--- a/audio/manager.c
+++ b/audio/manager.c
@@ -458,8 +458,11 @@ static void ag_io_cb(GIOChannel *chan, int err, const bdaddr_t *src,
goto drop;
}
- if (!device->headset)
+ if (!device->headset) {
btd_device_add_uuid(device->btd_dev, remote_uuid);
+ if (!device->headset)
+ goto drop;
+ }
if (headset_get_state(device) > HEADSET_STATE_DISCONNECTED) {
debug("Refusing new connection since one already exists");