Re: [PATCH BlueZ] core: Remove DiscoverSchedulerInterval option from main.conf

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

 



Hi Anderson,

On Fri, Apr 20, 2012 at 2:48 PM, Anderson Lizardo
<anderson.lizardo@xxxxxxxxxxxxx> wrote:
> Hi Luiz,
>
> On Thu, Apr 19, 2012 at 2:03 PM, Luiz Augusto von Dentz
> <luiz.dentz@xxxxxxxxx> wrote:
>> @@ -2541,11 +2541,10 @@ void adapter_set_discovering(struct btd_adapter *adapter,
>>        if (!adapter_has_discov_sessions(adapter) || adapter->discov_suspended)
>>                return;
>>
>> -       DBG("hci%u enabling timer, disc_sessions %u", adapter->dev_id,
>> +       DBG("hci%u restarting discovery, disc_sessions %u", adapter->dev_id,
>>                                        g_slist_length(adapter->disc_sessions));
>>
>> -       adapter->discov_id = g_timeout_add_seconds(main_opts.discov_interval,
>> -                                                       discovery_cb, adapter);
>> +       adapter->discov_id = g_idle_add(discovery_cb, adapter);
>
> Is it necessary to keep this id? I thought g_idle_add() would run as
> soon as (or close) control returns to mainloop.

I keep it just to avoid having to cancel the discovery in case the
discovery session is dropped during the same mainloop iteration, so it
let all the events be processed before restarting the discovery.


-- 
Luiz Augusto von Dentz
--
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