aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2022-01-14 14:28:40 -0500
committerScott Murray <scott.murray@konsulko.com>2022-01-14 14:50:00 -0500
commit0a7ac44764e96898370bdd14badfb484ad9d3fc7 (patch)
tree463512e057b25d172026a5f3088379be1eba7535
parent701f44587eabaa78dc1c180d8ca0ac8f848941d5 (diff)
One of the changes in my refactoring out of the binding code resulted in the asynchronous code path for BT adapter detection accidentally becoming synchronous, resulting in a significant delay in bluez_init calls when no adapter is present. Fix this by tweaking the signalling of init status from the handler thread to bluez_init to better match what was being done in the old codebase. Bug-AGL: SPEC-4216 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Ib58201eb9549ebcb3bc835809f7c4df47a87f45c
-rw-r--r--src/api.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api.c b/src/api.c
index 970deab..04c3dc2 100644
--- a/src/api.c
+++ b/src/api.c
@@ -624,11 +624,11 @@ static gpointer bluez_handler_func(gpointer ptr)
ERROR("bluetooth_register_agent() failed");
goto err_no_agent;
}
- } else {
- // Let main process know initialization is done
- signal_init_done(id, TRUE);
}
+ // Let main process know initialization is done
+ signal_init_done(id, TRUE);
+
// Cannot reference id after this point
g_atomic_rc_box_release(id);