BT_INFO_C("Terminating the bt-service daemon");
- if (main_loop != NULL) {
+ if (main_loop != NULL)
g_main_loop_quit(main_loop);
- } else {
+ else
exit(0);
- }
return FALSE;
}
if (_bt_get_enable_timer_id() == 0)
_bt_enable_adapter();
#else
- if (vconf_get_int(VCONFKEY_BT_STATUS, &bt_status) < 0) {
+ if (vconf_get_int(VCONFKEY_BT_STATUS, &bt_status) < 0)
BT_DBG("no bluetooth device info, so BT was disabled at previous session");
- }
- if (vconf_get_int(VCONFKEY_BT_LE_STATUS, &bt_le_status) < 0) {
+ if (vconf_get_int(VCONFKEY_BT_LE_STATUS, &bt_le_status) < 0)
BT_ERR("no bluetooth le info, so BT LE was disabled at previous session");
- }
if (vconf_get_int(BT_OFF_DUE_TO_FLIGHT_MODE, &flight_mode_deactivation) != 0)
BT_ERR("Fail to get the flight_mode_deactivation value");
sigaction(SIGINT, &sa, NULL);
sigaction(SIGTERM, &sa, NULL);
- if (_bt_service_initialize() != BLUETOOTH_ERROR_NONE) {
+ if (_bt_service_initialize() != BLUETOOTH_ERROR_NONE)
return 0;
- }
g_timeout_add(500, (GSourceFunc)__bt_check_bt_service, NULL);
g_main_loop_run(main_loop);
BT_DBG("g_main_loop_quit called!");
- if (main_loop != NULL) {
+ if (main_loop != NULL)
g_main_loop_unref(main_loop);
- }
if (terminated == FALSE)
__bt_release_service();