Skip to content

Commit 9cd9427

Browse files
ppryga-nordiccarlescufi
authored andcommitted
Bluetooth: Host: conn_change signal object not correclty initialied
The problem is visible after call to bt_disable when there was a connection. On a next bt_enable call when hc_tx_thread starts it is possible that the conn_change object internals are not re-initialized entirely and the function fails during k_poll call. The commit changes explicit assignment conn_change object to a k_poll_signal_init that does proper initialization. Signed-off-by: Piotr Pryga <[email protected]>
1 parent 2125a64 commit 9cd9427

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

subsys/bluetooth/host/conn.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,8 @@ int bt_conn_prepare_events(struct k_poll_event events[])
723723

724724
BT_DBG("");
725725

726-
conn_change.signaled = 0U;
726+
k_poll_signal_init(&conn_change);
727+
727728
k_poll_event_init(&events[ev_count++], K_POLL_TYPE_SIGNAL,
728729
K_POLL_MODE_NOTIFY_ONLY, &conn_change);
729730

0 commit comments

Comments
 (0)