summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2013-11-11 21:10:43 +0100
committerPaul Kocialkowski <contact@paulk.fr>2013-11-11 21:10:43 +0100
commit20c13c655e0cdd25d21d562d1d44988107a20711 (patch)
tree05c147bdeea1d7f868976cae3dbf2e7cb81ae28c /main
parent10b999d68cf2535cd5f7a4df3b20d801c8f09fe0 (diff)
downloadexternal_bluetooth_bluedroid-20c13c655e0cdd25d21d562d1d44988107a20711.zip
external_bluetooth_bluedroid-20c13c655e0cdd25d21d562d1d44988107a20711.tar.gz
external_bluetooth_bluedroid-20c13c655e0cdd25d21d562d1d44988107a20711.tar.bz2
Properly handle missing firmwaresreplicant-4.2-0001
Change-Id: I47d7d59c49d06149cbf27e0ac570188b451197f8 Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'main')
-rw-r--r--main/bte_main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/main/bte_main.c b/main/bte_main.c
index 4e7e37c..de73add 100644
--- a/main/bte_main.c
+++ b/main/bte_main.c
@@ -27,6 +27,8 @@
#include <stdlib.h>
#include <assert.h>
+#include <hardware/bluetooth.h>
+
#include "gki.h"
#include "bd.h"
#include "btu.h"
@@ -159,7 +161,7 @@ void bte_main_shutdown()
** Returns None
**
******************************************************************************/
-void bte_main_enable(uint8_t *local_addr)
+bt_status_t bte_main_enable(uint8_t *local_addr)
{
APPL_TRACE_DEBUG1("%s", __FUNCTION__);
@@ -173,7 +175,8 @@ void bte_main_enable(uint8_t *local_addr)
int result = bt_hc_if->init(&hc_callbacks, local_addr);
APPL_TRACE_EVENT1("libbt-hci init returns %d", result);
- assert(result == BT_HC_STATUS_SUCCESS);
+ if (result != BT_HC_STATUS_SUCCESS)
+ return BT_STATUS_FAIL;
if (hci_logging_enabled == TRUE)
bt_hc_if->logging(BT_HC_LOGGING_ON, hci_logfile);
@@ -206,6 +209,8 @@ void bte_main_enable(uint8_t *local_addr)
sizeof(bte_btu_stack));
GKI_run(0);
+
+ return BT_STATUS_SUCCESS;
}
/******************************************************************************