Fix dbus policies
[platform/core/connectivity/bluetooth-frwk.git] / bt-oal / oal-manager.c
old mode 100755 (executable)
new mode 100644 (file)
index cd1a39f..56b821f
 #include <oal-hardware.h>
 
 #define BT_HAL_LIB_NAME                        "libbluetooth.default.so"
+
+#ifdef ARCH64
+#define HAL_LIBRARY_PATH               "/usr/lib64"
+#else
 #define HAL_LIBRARY_PATH               "/usr/lib"
+#endif
+
 #define LIB_PATH_SIZE                  50
 #define LIB_NAME_SIZE                  50
 
@@ -78,8 +84,12 @@ oal_status_t oal_bt_init(oal_event_callback cb)
 void oal_bt_deinit(void)
 {
        BT_INFO("+");
-       blued_api->cleanup();
-       blued_api = NULL;
+       if (blued_api) {
+               blued_api->cleanup();
+               blued_api = NULL;
+       }
+       _bt_event_dispatcher_deinit();
+       sleep(1);
        unload_libs(NULL);
        BT_INFO("-");
 }