Modify the plugin loading path for ARCH64 80/120780/1 accepted/tizen/common/20170324.122714 accepted/tizen/ivi/20170324.110818 accepted/tizen/mobile/20170324.110605 accepted/tizen/tv/20170324.110714 accepted/tizen/unified/20170324.110859 accepted/tizen/wearable/20170324.110747 submit/tizen/20170324.071911
authorLee Hyuk <hyuk0512.lee@samsung.com>
Fri, 24 Mar 2017 07:10:41 +0000 (16:10 +0900)
committerLee Hyuk <hyuk0512.lee@samsung.com>
Fri, 24 Mar 2017 07:11:19 +0000 (16:11 +0900)
Change-Id: I829ba7ab6628faf03d71fd1510f8f8cda3576fe4
Signed-off-by: Lee Hyuk <hyuk0512.lee@samsung.com>
bt-service/bt-service-util.c
bt-service/include/bt-service-common.h

index 460cdb3..7a8f805 100644 (file)
@@ -154,9 +154,17 @@ void bluetooth_plugin_init()
                return;
        }
 
-       headed_plugin_info->handle_headed = dlopen(HEADED_PLUGIN_FILEPATH, RTLD_NOW);
+       /* check ARCH 64 or 32*/
+       if (!access(FILEPATH_ARCH_64, 0)) {
+               BT_INFO("plugin loading for ARCH 64");
+               headed_plugin_info->handle_headed = dlopen(HEADED_PLUGIN_FILEPATH64, RTLD_NOW);
+       } else {
+               BT_INFO("plugin loading for ARCH 32");
+               headed_plugin_info->handle_headed = dlopen(HEADED_PLUGIN_FILEPATH, RTLD_NOW);
+       }
+
        if (!headed_plugin_info->handle_headed) {
-               BT_ERR("Can not load %s: %s", HEADED_PLUGIN_FILEPATH, dlerror());
+               BT_ERR("Can not load plugin %s", dlerror());
                headed_plugin_info->plugin_headed_enabled = FALSE;
                return;
        }
index ba4ce1a..ca4ae48 100644 (file)
@@ -259,6 +259,8 @@ extern "C" {
 #define BT_LE_ADV_SCAN_RSP             0x04
 
 #define HEADED_PLUGIN_FILEPATH "/usr/lib/bt-plugin-headed.so"
+#define HEADED_PLUGIN_FILEPATH64 "/usr/lib64/bt-plugin-headed.so"
+#define FILEPATH_ARCH_64 "/usr/lib64"
 
 /* Profile states matched to btd_service_state_t of bluez service.h */
 typedef enum {