Nimble: Added return value (success / failure ) to nimble_port_init

This commit is contained in:
Rahul Tank
2022-12-20 14:11:52 +05:30
parent 1195b6cb2b
commit 826495a145
23 changed files with 144 additions and 49 deletions
@@ -406,7 +406,11 @@ app_main(void)
}
ESP_ERROR_CHECK(ret);
nimble_port_init();
ret = nimble_port_init();
if (ret != ESP_OK) {
MODLOG_DFLT(ERROR, "Failed to init nimble %d \n", ret);
return;
}
/* Initialize connection_handle array */
for (int i = 0; i <= CONFIG_BT_NIMBLE_MAX_CONNECTIONS; i++) {