diff options
-rw-r--r-- | btif/src/btif_core.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/btif/src/btif_core.c b/btif/src/btif_core.c index 2226a0f..66f0a7e 100644 --- a/btif/src/btif_core.c +++ b/btif/src/btif_core.c @@ -67,7 +67,7 @@ #include "bd.h" #include "btif_storage.h" #include "btif_util.h" - +#include "btif_sock.h" /************************************************************************************ ** Constants & Macros ************************************************************************************/ @@ -423,10 +423,14 @@ void btif_enable_bluetooth_evt(tBTA_STATUS status, BD_ADDR local_bd) { /* store state */ btif_enabled = 1; + //init rfcomm & l2cap api + btif_sock_init(); HAL_CBACK(bt_hal_cbacks, adapter_state_changed_cb, BT_STATE_ON); } else { + //cleanup rfcomm & l2cap api + btif_sock_cleanup(); btif_enabled = 0; HAL_CBACK(bt_hal_cbacks, adapter_state_changed_cb, BT_STATE_OFF); } |