Recover bluetoothd crash 55/101655/1
authorSeungyoun Ju <sy39.ju@samsung.com>
Fri, 2 Dec 2016 01:47:26 +0000 (10:47 +0900)
committerInjun Yang <injun.yang@samsung.com>
Fri, 2 Dec 2016 01:47:26 +0000 (10:47 +0900)
[Problem] After bluetoothd crash is happened, keep BT off state
[Cause & Measure] bluetoothd crash was not recovered
[Checking Method] Terminate bluetoothd (because of chipset malfunction)

Change-Id: I563c8873a78eb8fd6c6cf229e437886f6ea7e5c6
Signed-off-by: Injun Yang <injun.yang@samsung.com>
bt-service/bt-service-event-receiver.c

index 489c26c..ced268a 100644 (file)
@@ -2799,9 +2799,11 @@ static  void __bt_manager_event_filter(GDBusConnection *connection,
 
                if (strcasecmp(name, BT_BLUEZ_NAME) == 0) {
                        BT_INFO_C("### Bluetoothd is terminated");
-                       if (_bt_adapter_get_status() == BT_ACTIVATED)
-                                _bt_disable_cb();
-
+                       if (_bt_adapter_get_status() != BT_DEACTIVATING &&
+                               _bt_adapter_get_status() != BT_DEACTIVATED) {
+                               BT_INFO_C("### Recover it");
+                               _bt_recover_adapter();
+                       }
                        _bt_handle_adapter_removed();
                        __bt_devices_list_free();
                }