net: openthread: fix otPlatBleEnable
If BLE has already been enabled, `bt_enable` returns immediately and does not call passed callback function. In this case, call `bt_conn_cb_register` to ensure that callbacks are registered correctly. Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
This commit is contained in:
parent
645267288c
commit
1bd8e4459a
1 changed files with 1 additions and 1 deletions
|
@ -476,7 +476,7 @@ otError otPlatBleEnable(otInstance *aInstance)
|
|||
LOG_WRN("BLE enable failed with error code %d", err);
|
||||
return OT_ERROR_FAILED;
|
||||
} else if (err == -EALREADY) {
|
||||
err = k_sem_take(&ot_plat_ble_init_semaphore, K_MSEC(500));
|
||||
bt_conn_cb_register(&conn_callbacks);
|
||||
return OT_ERROR_NONE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue