Check if btd_device_add_uuid succeeded.

This commit is contained in:
Luiz Augusto von Dentz 2008-12-02 09:45:22 -03:00
parent 901a2c3041
commit 4ed78c91a7

View File

@ -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");