On IVI, bluetooth is enabled defaultly.
Therefore, bt-core doesn't know the BT status.
It results in that bt-core can't close BT.
The patch will fix the bug on IVI.
Change-Id: Ic16b0430fe0cb65856b84e0e2f9f903ecf800cbe
BT_DBG("");
+#ifdef __TIZEN_MOBILE__
status = __bt_core_get_status();
if (status == BT_ACTIVATING) {
/* Forcely terminate */
BT_DBG("Invalid state %d", status);
return -1;
}
-
+#endif
__bt_core_set_status(BT_DEACTIVATING);
if (system("/usr/etc/bluetooth/bt-stack-down.sh &") < 0) {
BT_DBG("running script failed");
- __bt_core_set_status( BT_ACTIVATED);
+ __bt_core_set_status(BT_ACTIVATED);
return -1;
}
-
+#ifndef __TIZEN_MOBILE__
+ __bt_core_terminate();
+#endif
return 0;
}