summaryrefslogtreecommitdiff
path: root/src/adapter.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/adapter.c')
-rw-r--r--src/adapter.c5
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);
}
}