when BT core status is abnormal (ex. recursive BT module detachment),
bt-core process is not terminated because of it is recovery mode.
then the core adapter status is stuck in BT_DEACTIVATING status,
after that the BT adapter can't be enabled / disabled.
So, in bt_check_terminating_condition, add check core status and recovery mode.
if it is abnormal, let the bt-core be terminated.
Change-Id: I48e4903e448e54743469afbd7b59d8cec7d520d2
Signed-off-by: shss-choi <shss.choi@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
int bt_off_flight_mode = 0; /* if BT was off due to FlightMode*/
int bt_off_ps_mode = 0;
+ if (TIZEN_FEATURE_FHUB_REFERENCE) {
+ int bt_status = BT_ACTIVATED;
+
+ bt_status = _bt_core_get_status();
+ BT_DBG("bt_status : %d", bt_status);
+
+ if (_bt_core_is_recovery_mode() == TRUE && bt_status != BT_DEACTIVATED) {
+ BT_INFO("The core adapter is NOT normal.. so terminate bt-core");
+ return TRUE;
+ }
+ }
+
if (_bt_core_is_recovery_mode() == TRUE) {
BT_DBG("Bt core not terminated");
return FALSE;
void _bt_core_terminate(void)
{
+ BT_DBG("+");
if (_bt_check_terminating_condition() == FALSE)
return;