On Wed, Mar 14, 2012 at 14:03, Anderson Lizardo <anderson.lizardo@xxxxxxxxxxxxx> wrote: > Hi Arik, > > On Thu, Mar 8, 2012 at 9:44 AM, Arik Nemtsov <arik@xxxxxxxxxx> wrote: >> If a device is already connected, don't auto-connect if we register >> a disconnect-only attio callback. This will obviously fail. >> --- >> src/device.c | 13 +++++++++---- >> 1 files changed, 9 insertions(+), 4 deletions(-) > > I can't see why this patch is necessary. attio_connected() seems to > properly check that device->cfunc is set before calling it. > > Can you explain why you need it? Before this patch, if we register a disconnect-only attio callback (cfunc is NULL) when the device is connected, it will cause this line to be called: device->auto_id = g_idle_add_full(G_PRIORITY_DEFAULT_IDLE, att_connect, device, att_connect_dispatched); I guess the code wasn't really tested with a disconnect-only attio callback. I think I added the first such callback in the proximity reporter profiles. Arik -- 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