From b7d403ddfeef1244ed51690753454f0db964667e Mon Sep 17 00:00:00 2001 From: Wu Meng Shi Date: Mon, 16 Oct 2023 12:01:28 +0800 Subject: [PATCH] fix(ble_mesh): avoid executing bt_mesh_host_init() more than once when using nimble (v5.1) --- .../bt/esp_ble_mesh/mesh_core/nimble_host/mesh_bearer_adapt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/bt/esp_ble_mesh/mesh_core/nimble_host/mesh_bearer_adapt.c b/components/bt/esp_ble_mesh/mesh_core/nimble_host/mesh_bearer_adapt.c index be3a11595d..a651b54284 100644 --- a/components/bt/esp_ble_mesh/mesh_core/nimble_host/mesh_bearer_adapt.c +++ b/components/bt/esp_ble_mesh/mesh_core/nimble_host/mesh_bearer_adapt.c @@ -88,7 +88,8 @@ int bt_mesh_host_init(void) int rc; if (init == true) { - return -EALREADY; + BT_WARN("Already initialized host for mesh!"); + return 0; } rc = btc_init();