diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2012-10-15 15:55:48 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-10-15 15:55:57 +0300 |
commit | 8e1c00895404d057841aa045f59c5f2f257a10f3 (patch) | |
tree | 5d75006199e275a801990ff4da3b1d6abb2232ed /src | |
parent | 58345dec54466d5de52d0afd9ed835940d027ee8 (diff) |
adapter: Use idle callbacks for forcing DevicesFound events
This way we ensure that we include all found devices from the current
mainloop iteration into the DevicesFound signal.
Diffstat (limited to 'src')
-rw-r--r-- | src/adapter.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/adapter.c b/src/adapter.c index 05df20c4..8c8b7905 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -2853,11 +2853,10 @@ void adapter_update_found_devices(struct btd_adapter *adapter, pending_count = g_slist_length(discovery->pending); if (discovery->id == 0) { - send_found(adapter); + discovery->id = g_idle_add(send_found, adapter); } else if (pending_count > PENDING_FOUND_MAX) { g_source_remove(discovery->id); - discovery->id = 0; - send_found(adapter); + discovery->id = g_idle_add(send_found, adapter); } } |