Re: [PATCH 1/2] device: don't auto-connect on disc-cb attio callback registration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Arik,

On Wed, Mar 14, 2012 at 8:09 AM, Arik Nemtsov <arik@xxxxxxxxxx> wrote:
>> 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.

Ok, so the problem is actually the " && cfunc" condition which makes
the wrong branch to be followed if only a disconnect callback is
registered.

So the patch makes sense and looks good.

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


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux