Fix the build warning 44/90044/1 accepted/tizen/common/20160928.164252 accepted/tizen/ivi/20160929.002007 accepted/tizen/mobile/20160929.001903 accepted/tizen/tv/20160929.001916 accepted/tizen/wearable/20160929.002043 submit/tizen/20160928.062430
authorHyuk Lee <hyuk0512.lee@samsung.com>
Wed, 28 Sep 2016 06:44:59 +0000 (15:44 +0900)
committerHyuk Lee <hyuk0512.lee@samsung.com>
Wed, 28 Sep 2016 06:44:59 +0000 (15:44 +0900)
Change-Id: I87fb53a4c88c451bef274d32fe247a73229447d4
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
bt-service/bt-service-obex-server.c

index 3c0003d..bf726c1 100644 (file)
@@ -987,13 +987,13 @@ gboolean __bt_check_folder_path(const char *dest_path)
        return TRUE;
 }
 
-const char *__bt_transfer_folder_path(const char *dest_path)
+char *__bt_transfer_folder_path(char *dest_path)
 {
-       const char *dst_path = (const char *)g_malloc0(BT_OBEX_PATH_MAX_LENGTH);
+       char *dst_path = (char *)g_malloc0(BT_OBEX_PATH_MAX_LENGTH);
        if (g_str_has_prefix(dest_path, BT_OBEX_PATH_PREFIX)) {
-               snprintf((const char *)dst_path, BT_OBEX_PATH_MAX_LENGTH, BT_OBEX_DEFAULT_PATH"%s", dest_path + strlen(BT_OBEX_PATH_PREFIX));
+               snprintf(dst_path, BT_OBEX_PATH_MAX_LENGTH, BT_OBEX_DEFAULT_PATH"%s", dest_path + strlen(BT_OBEX_PATH_PREFIX));
        } else {
-               snprintf((const char *)dst_path, BT_OBEX_PATH_MAX_LENGTH, "%s", dest_path);
+               snprintf(dst_path, BT_OBEX_PATH_MAX_LENGTH, "%s", dest_path);
        }
 
        BT_INFO("obex transfed path : %s", dst_path);
@@ -1004,8 +1004,8 @@ int _bt_obex_server_allocate(char *sender, const char *dest_path, int app_pid, g
 {
        BT_DBG("+");
 
-       const char *dst_path;
-       dst_path = __bt_transfer_folder_path(dest_path);
+       char *dst_path;
+       dst_path = __bt_transfer_folder_path((char *)dest_path);
 
        if (__bt_check_folder_path(dst_path) == FALSE) {
                g_free(dst_path);
@@ -1168,8 +1168,8 @@ int _bt_obex_server_set_destination_path(const char *dest_path,
        bt_server_info_t *server_info;
        BT_CHECK_PARAMETER(dest_path, return);
 
-       const char *dst_path;
-       dst_path = __bt_transfer_folder_path(dest_path);
+       char *dst_path;
+       dst_path = __bt_transfer_folder_path((char *)dest_path);
 
        DIR *dp = NULL;
 
@@ -1208,8 +1208,8 @@ int _bt_obex_server_set_root(const char *root)
 
        BT_CHECK_PARAMETER(root, return);
 
-       const char *dst_root;
-       dst_root = __bt_transfer_folder_path(root);
+       char *dst_root;
+       dst_root = __bt_transfer_folder_path((char *)root);
 
        if (!agent_info.proxy) {
                BT_ERR("obex agent_info proxy error");