if (0 != ret)
ERR("vconf_ignore_key_changed failed\n");
+/* unregister all the services/servers/profiles registered on bluez-adapter
+ once adapter is removed, reinitializing of the state-varaibles becomes
+ a problem */
+ if (_bt_unregister_obex_server() != BLUETOOTH_ERROR_NONE)
+ BT_ERR("Fail to unregister obex server");
+
+ if (_bt_unregister_media_player() != BLUETOOTH_ERROR_NONE)
+ BT_ERR("Fail to unregister media player");
+
+/* Other unregister APIs should be placed here */
+
+
#ifndef TIZEN_FEATURE_BT_USB_DONGLE
_bt_destroy_agent(adapter_agent);
adapter_agent = NULL;
g_source_remove(timer_id);
timer_id = 0;
}
+/* unregister all the services/servers/profiles registered on bluez-adapter
+ once adapter is removed, reinitializing of the state-varaibles becomes
+ a problem */
+ if (_bt_unregister_obex_server() != BLUETOOTH_ERROR_NONE)
+ BT_ERR("Fail to unregister obex server");
+
+ if (_bt_unregister_media_player() != BLUETOOTH_ERROR_NONE)
+ BT_ERR("Fail to unregister media player");
+/* Other unregister APIs should be placed here */
__bt_disconnect_all();
ret = _bt_disable_cb();