Hi, On Wed, Dec 12, 2012 at 8:52 AM, Anderson Lizardo <anderson.lizardo@xxxxxxxxxxxxx> wrote: > Hi Szymon, > > On Wed, Dec 12, 2012 at 6:28 AM, Szymon Janc <szymon.janc@xxxxxxxxx> wrote: >> @@ -1129,13 +1129,18 @@ static void avctp_confirm_cb(GIOChannel *chan, gpointer data) >> >> DBG("AVCTP: incoming connect from %s", address); >> >> - session = avctp_get_internal(&src, &dst); >> + device = adapter_find_device(manager_find_adapter(&src), address); >> + if (!device) >> + return; >> + >> + session = avctp_get_internal(device); >> if (session == NULL) >> return; >> >> - dev = manager_get_device(&src, &dst, FALSE); >> + dev = manager_get_device(&src, device_get_address(device), FALSE); >> if (!dev) { >> - dev = manager_get_device(&src, &dst, TRUE); >> + dev = manager_get_device(&src, device_get_address(device), >> + TRUE); >> if (!dev) { >> error("Unable to get audio device object for %s", >> address); > > The snippet above looks strange. You already have the device, why call > manager_get_device() again? Looks like to me a bunch of this code can > be removed and the error message above could be moved to the if() > after adapter_find_device(). Ignore that, now I see "manager_get_device()" returns a audio device, not btd_device :) Regards, -- Anderson Lizardo Instituto Nokia de Tecnologia - INdT Manaus - Brazil -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html