All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: Anderson Lizardo <anderson.lizardo@openbossa.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ] core: Remove DiscoverSchedulerInterval option from main.conf
Date: Fri, 20 Apr 2012 14:57:58 +0300	[thread overview]
Message-ID: <CABBYNZJxtwuz6e1tzVRwSV8-C3FDmuuy6ATg7QV5CO0a7oKSOQ@mail.gmail.com> (raw)
In-Reply-To: <CAJdJm_NE5i+7UwsQQuw_==Y0_LgYK2Tz8BugET4od7fFPpYiQQ@mail.gmail.com>

Hi Anderson,

On Fri, Apr 20, 2012 at 2:48 PM, Anderson Lizardo
<anderson.lizardo@openbossa.org> wrote:
> Hi Luiz,
>
> On Thu, Apr 19, 2012 at 2:03 PM, Luiz Augusto von Dentz
> <luiz.dentz@gmail.com> 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

  reply	other threads:[~2012-04-20 11:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-19 18:03 [PATCH BlueZ] core: Remove DiscoverSchedulerInterval option from main.conf Luiz Augusto von Dentz
2012-04-20 11:48 ` Anderson Lizardo
2012-04-20 11:57   ` Luiz Augusto von Dentz [this message]
2012-04-23 10:41 ` Johan Hedberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABBYNZJxtwuz6e1tzVRwSV8-C3FDmuuy6ATg7QV5CO0a7oKSOQ@mail.gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=anderson.lizardo@openbossa.org \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.