From dc75dc6ec7312d682f06a57fe4675c0b8cef1196 Mon Sep 17 00:00:00 2001 From: Wu Meng Shi Date: Mon, 25 Sep 2023 21:25:59 +0800 Subject: [PATCH] fix(ble_mesh): avoid executing bt_mesh_host_init() more than once when using nimble --- components/bt/esp_ble_mesh/core/nimble_host/adapter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/bt/esp_ble_mesh/core/nimble_host/adapter.c b/components/bt/esp_ble_mesh/core/nimble_host/adapter.c index 398c1526a9..eec69f1080 100644 --- a/components/bt/esp_ble_mesh/core/nimble_host/adapter.c +++ b/components/bt/esp_ble_mesh/core/nimble_host/adapter.c @@ -87,7 +87,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();