diff options
author | Scott Murray <scott.murray@konsulko.com> | 2022-01-14 14:28:40 -0500 |
---|---|---|
committer | Scott Murray <scott.murray@konsulko.com> | 2022-01-14 14:50:00 -0500 |
commit | 0a7ac44764e96898370bdd14badfb484ad9d3fc7 (patch) | |
tree | 463512e057b25d172026a5f3088379be1eba7535 | |
parent | 701f44587eabaa78dc1c180d8ca0ac8f848941d5 (diff) |
Avoid init delay without BT adapter presentmarlin_12.92.0marlin/12.92.0lamprey_12.1.1lamprey/12.1.112.92.012.1.1
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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); |