Change path information to secure log 98/215498/3
authorjiyong.min <jiyong.min@samsung.com>
Thu, 10 Oct 2019 00:21:02 +0000 (09:21 +0900)
committerjiyong.min <jiyong.min@samsung.com>
Thu, 10 Oct 2019 02:12:40 +0000 (11:12 +0900)
Change-Id: I31733db9538dcb9b218b4f61ffe121388e723886

src/common/include/media-common-dbg.h
src/common/media-common-db-svc.c [changed mode: 0755->0644]
src/common/media-common-system.c [changed mode: 0755->0644]
src/common/media-common-utils.c [changed mode: 0755->0644]
src/scanner-v2/media-scanner-extract-v2.c [changed mode: 0755->0644]
src/scanner-v2/media-scanner-scan-v2.c [changed mode: 0755->0644]
src/scanner-v2/media-scanner-v2.c [changed mode: 0755->0644]
src/scanner/media-scanner-scan.c [changed mode: 0755->0644]
src/server/media-server-device-block.c [changed mode: 0755->0644]
src/server/media-server-main.c [changed mode: 0755->0644]
src/server/media-server-socket.c [changed mode: 0755->0644]

index 2410c24..e79d863 100755 (executable)
                SECURE_LOGD(FONT_COLOR_CYAN""fmt""FONT_COLOR_RESET, ##arg); \
                } } while (false)
 
+#define MS_DBG_SINFO(fmt, arg...) do { if (true) { \
+               SECURE_LOGI(FONT_COLOR_CYAN""fmt""FONT_COLOR_RESET, ##arg); \
+               } } while (false)
+
+#define MS_DBG_SWARN(fmt, arg...) do { if (true) { \
+               SECURE_LOGI(FONT_COLOR_CYAN""fmt""FONT_COLOR_RESET, ##arg); \
+               } } while (false)
+
 #define MS_DBG_SERR(fmt, arg...) do { if (true) { \
                        SECURE_LOGE(FONT_COLOR_RED""fmt""FONT_COLOR_RESET, ##arg); \
                        } } while (false)
old mode 100755 (executable)
new mode 100644 (file)
index e7d63a7..b6a50c8
@@ -748,7 +748,7 @@ int ms_get_folder_scan_status(sqlite3 *handle, const char *storage_id, const cha
        MS_DBG_RETVM_IF(ret != MS_MEDIA_ERR_NONE, ret, "GET_FOLDER_SCAN_STATUS failed [%d]", ret);
        *scan_status = status;
 
-       MS_DBG("OK path = [%s], scan_status = [%d]", path, *scan_status);
+       MS_DBG_SLOG("OK path = [%s], scan_status = [%d]", path, *scan_status);
 
        return ret;
 }
@@ -761,7 +761,7 @@ int ms_set_folder_scan_status(sqlite3 *handle, const char *storage_id, const cha
        ret = ((SET_FOLDER_SCAN_STATUS)func_array[eSET_FOLDER_SCAN_STATUS])(handle, storage_id, path, status, uid); /*dlopen*/
        MS_DBG_RETVM_IF(ret != MS_MEDIA_ERR_NONE, ret, "SET_FOLDER_SCAN_STATUS failed [%d]", ret);
 
-       MS_DBG("OK path = [%s], scan_status = [%d]", path, scan_status);
+       MS_DBG_SLOG("OK path = [%s], scan_status = [%d]", path, scan_status);
 
        return ret;
 }
old mode 100755 (executable)
new mode 100644 (file)
index 6625561..9637622
@@ -98,7 +98,7 @@ static void __ms_block_changed(GDBusConnection* connection,
        mount_path = g_variant_get_string(tmp, &size);
        if (mount_path != NULL) {
                block_info->mount_path = strdup(mount_path);
-               MS_DBG_INFO("mount_point : %s", block_info->mount_path);
+               MS_DBG_SINFO("mount_point : %s", block_info->mount_path);
        }
 
        tmp = g_variant_get_child_value(parameters, 9);
@@ -416,14 +416,14 @@ int ms_sys_get_device_list(ms_stg_type_e stg_type, GArray **dev_list)
                                        if (err != USB_ERROR_LIST_FAILED_TO_GET && device != NULL) {
                                                mount_path = usb_device_get_mountpath(device);
                                                if (mount_path != NULL)
-                                                       MS_DBG_WARN("mount_path [%s]", mount_path);
+                                                       MS_DBG_SWARN("mount_path [%s]", mount_path);
                                        }
                                } else {
                                        usb_device_list_get_next(list, &device);
                                        if (device != NULL) {
                                                mount_path = usb_device_get_mountpath(device);
                                                if (mount_path != NULL)
-                                                       MS_DBG_WARN("mount_path [%s]", mount_path);
+                                                       MS_DBG_SWARN("mount_path [%s]", mount_path);
                                        }
                                }
 
old mode 100755 (executable)
new mode 100644 (file)
index 28e3205..5f08373
@@ -374,7 +374,7 @@ bool ms_storage_mount_status(const char* start_path)
 
        storage_path = strndup(start_path, strlen(start_path) - remain_len);
 
-       MS_DBG_WARN("storage_path [%s]", storage_path);
+       MS_DBG_SWARN("storage_path [%s]", storage_path);
 
        err = usb_device_get_device_list(USB_MASS_STORAGE, &list);
        if (err == 0) {
@@ -384,10 +384,10 @@ bool ms_storage_mount_status(const char* start_path)
                        if (err != USB_ERROR_LIST_FAILED_TO_GET && device != NULL) {
                                mount_path = usb_device_get_mountpath(device);
                                if (mount_path != NULL) {
-                                       MS_DBG_WARN("mount_path [%s]", mount_path);
+                                       MS_DBG_SWARN("mount_path [%s]", mount_path);
                                        if (strlen(mount_path) == strlen(storage_path)) {
                                                if (strncmp(mount_path, storage_path, strlen(mount_path)) == 0) {
-                                                       MS_DBG_WARN("start path is mounted [%s]", start_path);
+                                                       MS_DBG_SWARN("start path is mounted [%s]", start_path);
                                                        ret = true;
                                                }
                                        }
@@ -399,10 +399,10 @@ bool ms_storage_mount_status(const char* start_path)
                                        if (device != NULL) {
                                                mount_path = usb_device_get_mountpath(device);
                                                if (mount_path != NULL) {
-                                                       MS_DBG_WARN("mount_path [%s]", mount_path);
+                                                       MS_DBG_SWARN("mount_path [%s]", mount_path);
                                                        if (strlen(mount_path) == strlen(storage_path)) {
                                                                if (strncmp(mount_path, storage_path, strlen(mount_path)) == 0) {
-                                                                       MS_DBG_WARN("start path is mounted [%s]", start_path);
+                                                                       MS_DBG_SWARN("start path is mounted [%s]", start_path);
                                                                        ret = true;
                                                                        break;
                                                                }
old mode 100755 (executable)
new mode 100644 (file)
index c9af5ed..941727c
@@ -608,7 +608,7 @@ int _msc_set_extract_item(s_extract_item** item, const char* path, int pid)
        extract_item->pid = pid;
        *item = extract_item;
 
-       MS_DBG_WARN("_msc_set_extract_item path[%s],pid[%d]", extract_item->path, extract_item->pid);
+       MS_DBG_SWARN("_msc_set_extract_item path[%s],pid[%d]", extract_item->path, extract_item->pid);
        return MS_MEDIA_ERR_NONE;
 }
 
@@ -680,7 +680,7 @@ int msc_set_extract_blocked_path(const char *blocked_path)
        g_mutex_lock(&extract_blocked_mutex);
 
        if (g_extract_blocked_path != NULL) {
-               MS_DBG_ERR("g_extract_blocked_path is not NULL [%s]", g_extract_blocked_path);
+               MS_DBG_SERR("g_extract_blocked_path is not NULL [%s]", g_extract_blocked_path);
                MS_SAFE_FREE(g_extract_blocked_path);
        }
 
@@ -705,7 +705,7 @@ int msc_del_extract_blocked_path(const char* blocked_path)
                }
        } else {
                if (g_extract_blocked_path != NULL) {
-                       MS_DBG_ERR("g_extract_blocked_path is deleted [%s]", g_extract_blocked_path);
+                       MS_DBG_SERR("g_extract_blocked_path is deleted [%s]", g_extract_blocked_path);
                        MS_SAFE_FREE(g_extract_blocked_path);
                }
        }
@@ -742,10 +742,10 @@ static int __msc_check_extract_stop_status(int scan_type, const char *start_path
                /* check cancel path */
                //MS_DBG_ERR("__msc_check_extract_stop_status...");
                if ((cancel_extract_item != NULL) && (cancel_extract_item->path != NULL)) {
-                       MS_DBG_WARN("check cancel storage [%s][%s]", cancel_extract_item->path, start_path);
+                       MS_DBG_SWARN("check cancel storage [%s][%s]", cancel_extract_item->path, start_path);
                        if ((strncmp(cancel_extract_item->path, start_path, strlen(cancel_extract_item->path)) == 0)
                                && (cancel_extract_item->pid == -1 || cancel_extract_item->pid == pid)) {
-                               MS_DBG_WARN("Receive cancel request [%s][%s]. STOP scan!!", cancel_extract_item->path, start_path);
+                               MS_DBG_SWARN("Receive cancel request [%s][%s]. STOP scan!!", cancel_extract_item->path, start_path);
                                unsigned int path_len = strlen(cancel_extract_item->path);
 
                                if (strlen(start_path) > path_len) {
@@ -774,9 +774,9 @@ static int __msc_check_extract_stop_status(int scan_type, const char *start_path
                g_mutex_lock(&extract_blocked_mutex);
                /* check block path */
                if (g_extract_blocked_path != NULL) {
-                       //MS_DBG_WARN("check blocked storage [%s][%s]", g_extract_blocked_path, start_path);
+                       //MS_DBG_SWARN("check blocked storage [%s][%s]", g_extract_blocked_path, start_path);
                        if (strncmp(start_path, g_extract_blocked_path, strlen(g_extract_blocked_path)) == 0) {
-                               MS_DBG_ERR("Receive blocked message[%s][%s]. STOP extract!!", g_extract_blocked_path, start_path);
+                               MS_DBG_SERR("Receive blocked message[%s][%s]. STOP extract!!", g_extract_blocked_path, start_path);
                                ret = MS_MEDIA_ERR_SCANNER_FORCE_STOP;
                        }
                        if (is_end) {
old mode 100755 (executable)
new mode 100644 (file)
index 73950cc..46fdad5
@@ -207,10 +207,10 @@ static int __msc_check_stop_status(int scan_type, const char *start_path, int pi
                /* check cancel path */
                //MS_DBG_ERR("__msc_check_stop_status...");
                if ((cancel_scan_item != NULL) && (cancel_scan_item->path != NULL)) {
-                       MS_DBG_WARN("check blocked storage [%s][%s]", cancel_scan_item->path, start_path);
+                       MS_DBG_SWARN("check blocked storage [%s][%s]", cancel_scan_item->path, start_path);
                        if ((strncmp(cancel_scan_item->path, start_path, strlen(cancel_scan_item->path)) == 0)
                                && (cancel_scan_item->pid == -1 || cancel_scan_item->pid == pid)) {
-                               MS_DBG_ERR("Receive cancel request [%s][%s]. STOP scan!!", cancel_scan_item->path, start_path);
+                               MS_DBG_SWARN("Receive cancel request [%s][%s]. STOP scan!!", cancel_scan_item->path, start_path);
                                unsigned int path_len = strlen(cancel_scan_item->path);
 
                                if (strlen(start_path) > path_len) {
@@ -233,7 +233,7 @@ static int __msc_check_stop_status(int scan_type, const char *start_path, int pi
                g_mutex_lock(&blocked_mutex2);
                /* check cancel path */
                if (g_blocked_path2 != NULL) {
-                       MS_DBG_WARN("check blocked storage [%s][%s]", g_blocked_path2, start_path);
+                       MS_DBG_SWARN("check blocked storage [%s][%s]", g_blocked_path2, start_path);
                        if (strncmp(start_path, g_blocked_path2, strlen(start_path)) == 0) {
                                MS_DBG_ERR("Receive blocked message[%s][%s]. STOP scan!!",
                                g_blocked_path2, start_path);
@@ -270,7 +270,7 @@ static int __msc_dir_scan_for_folder(sqlite3 *handle, const char *storage_id, co
        const char *trash = "$RECYCLE.BIN";
 
 
-       MS_DBG_WARN("storage id [%s] start path [%s]", storage_id, start_path);
+       MS_DBG_SWARN("storage id [%s] start path [%s]", storage_id, start_path);
 
        /* make new array for storing directory */
        dir_array = g_array_new(FALSE, FALSE, sizeof(char*));
@@ -300,7 +300,7 @@ static int __msc_dir_scan_for_folder(sqlite3 *handle, const char *storage_id, co
                if (ms_insert_folder(handle, storage_id, new_start_path, uid) != MS_MEDIA_ERR_NONE)
                        MS_DBG_ERR("insert folder failed");
 
-               MS_DBG_WARN("ms_insert_folder insert path[%s]", new_start_path);
+               MS_DBG_SWARN("ms_insert_folder insert path[%s]", new_start_path);
        } else {
                if (ms_set_folder_validity(handle, storage_id, new_start_path, MS_INVALID, is_recursive, uid) != MS_MEDIA_ERR_NONE)
                        MS_DBG_ERR("set_folder_validity failed [%d] ", scan_type);
@@ -328,7 +328,7 @@ static int __msc_dir_scan_for_folder(sqlite3 *handle, const char *storage_id, co
                if (strncmp(current_path, MEDIA_ROOT_PATH_DISC, strlen(MEDIA_ROOT_PATH_DISC)) != 0) {
                        ret = ms_check_scan_ignore(current_path, uid);
                        if (ret != MS_MEDIA_ERR_NONE) {
-                               MS_DBG_ERR("%s is ignore", current_path);
+                               MS_DBG_SERR("%s is ignore", current_path);
                                MS_SAFE_FREE(current_path);
                                if (ret == MS_MEDIA_ERR_USB_UNMOUNTED)
                                        goto STOP_SCAN;
@@ -600,7 +600,7 @@ static int __msc_dir_scan_for_storage(sqlite3 *handle, const char *storage_id, c
        bool is_missing = false;
        ms_dir_scan_status_e scan_status = MS_DIR_SCAN_NONE;
 
-       MS_DBG_WARN("storage id [%s] start path [%s]", storage_id, start_path);
+       MS_DBG_SWARN("storage id [%s] start path [%s]", storage_id, start_path);
 
        /* make new array for storing directory */
        dir_array = g_array_new(FALSE, FALSE, sizeof(char*));
@@ -642,7 +642,7 @@ static int __msc_dir_scan_for_storage(sqlite3 *handle, const char *storage_id, c
 
                ret = ms_check_scan_ignore(current_path, uid);
                if (ret != MS_MEDIA_ERR_NONE) {
-                       MS_DBG_ERR("%s is ignore", current_path);
+                       MS_DBG_SERR("%s is ignore", current_path);
                        MS_SAFE_FREE(current_path);
                        if (ret == MS_MEDIA_ERR_USB_UNMOUNTED)
                                goto STOP_SCAN;
@@ -660,21 +660,21 @@ static int __msc_dir_scan_for_storage(sqlite3 *handle, const char *storage_id, c
 
                if (scan_status == MS_DIR_SCAN_PROCESSING && g_directory_scan_processing2 != DIR_SCAN_NON_SCAN) {
 
-                       MS_DBG_ERR("%s is scanning, ignore current path, scan next path !!", current_path);
+                       MS_DBG_SERR("%s is scanning, ignore current path, scan next path !!", current_path);
 
                        is_missing = true;
                        goto NEXT_SCAN;
 
                } else if (scan_status == MS_DIR_SCAN_DONE) {
                        if (g_directory_scan_processing2 == DIR_SCAN_NON_RECURSIVE) {
-                               MS_DBG_ERR("%s is scan done, ignore current path, get subfolder list!!", current_path);
+                               MS_DBG_SERR("%s is scan done, ignore current path, get subfolder list!!", current_path);
 
                                __msc_get_null_scan_folder_list(handle, storage_id, current_path, dir_array);
 
                                continue;
 
                        } else if (g_directory_scan_processing2 == DIR_SCAN_RECURSIVE) {
-                               MS_DBG_ERR("%s is scan done, ignore current path, scan next path!!", current_path);
+                               MS_DBG_SERR("%s is scan done, ignore current path, scan next path!!", current_path);
 
                                is_missing = true;
                                goto NEXT_SCAN;
@@ -918,7 +918,7 @@ int __msc_get_null_scan_folder_list(sqlite3 *handle, const char *stroage_id, cha
                while (cur_dir_array->len != 0) {
                        current_path = g_array_index(cur_dir_array , char*, 0);
                        g_array_remove_index(cur_dir_array, 0);
-                       MS_DBG("current_path = [%s]", current_path);
+                       MS_DBG_SLOG("current_path = [%s]", current_path);
 
                        new_path = strdup(current_path);
                        g_array_append_val(dir_array, new_path);
@@ -1173,7 +1173,7 @@ gboolean msc_directory_scan_thread(void *data)
                        /*get the UUID of deleted folder*/
                        ms_get_folder_id(handle, storage_id, scan_data->msg, &folder_uuid);
 
-                       MS_DBG_WARN("[%.*s][%s] delete path", MAX_MSG_SIZE, scan_data->msg, folder_uuid);
+                       MS_DBG_SWARN("[%.*s][%s] delete path", MAX_MSG_SIZE, scan_data->msg, folder_uuid);
                }
 
                if (scan_type == MS_MSG_DIRECTORY_SCANNING) {
@@ -1581,7 +1581,7 @@ static int __msc_make_file_list(char *file_path, GArray **path_array, uid_t uid)
                /* check valid path */
                ret = ms_check_ignore_dir(path, uid);
                if (ret != MS_MEDIA_ERR_NONE) {
-                       MS_DBG_ERR("invalide path : %s", path);
+                       MS_DBG_SERR("invalide path : %s", path);
                        MS_SAFE_FREE(path);
                        continue;
                }
@@ -1807,7 +1807,7 @@ int _msc_set_scan_item(s_scan_item** item, const char* path, int pid)
        scan_item->pid = pid;
        *item = scan_item;
 
-       MS_DBG_WARN("path[%s],pid[%d]", scan_item->path, scan_item->pid);
+       MS_DBG_SWARN("path[%s],pid[%d]", scan_item->path, scan_item->pid);
        return MS_MEDIA_ERR_NONE;
 }
 
@@ -1832,8 +1832,8 @@ int msc_set_cancel_scan_item(const char* cancel_path, int pid)
        }
 
        if (cur_scan_item != NULL && cur_scan_item->path != NULL) {
-               MS_DBG_WARN("cur_scan_item->path[%s], cur_scan_item->pid[%d]", cur_scan_item->path, cur_scan_item->pid);
-               MS_DBG_WARN("cancel_path[%s], pid[%d]", cancel_path, pid);
+               MS_DBG_SWARN("cur_scan_item->path[%s], cur_scan_item->pid[%d]", cur_scan_item->path, cur_scan_item->pid);
+               MS_DBG_SWARN("cancel_path[%s], pid[%d]", cancel_path, pid);
                if ((strcmp(cur_scan_item->path, cancel_path) == 0) && (pid == cur_scan_item->pid))
                        ret = _msc_set_scan_item(&cancel_scan_item, cancel_path, pid);
                else if ((pid == -1) && (strncmp(cur_scan_item->path, cancel_path, strlen(cancel_path)) == 0))
@@ -1883,7 +1883,7 @@ int msc_set_blocked_path(const char *blocked_path)
        g_mutex_lock(&blocked_mutex2);
 
        if (g_blocked_path2 != NULL) {
-               MS_DBG_WARN("g_blocked_path is not NULL [%s]", g_blocked_path2);
+               MS_DBG_SWARN("g_blocked_path is not NULL [%s]", g_blocked_path2);
                MS_SAFE_FREE(g_blocked_path2);
        }
 
@@ -1903,7 +1903,7 @@ int msc_del_blocked_path(void)
        g_mutex_lock(&blocked_mutex2);
 
        if (g_blocked_path2 != NULL) {
-               MS_DBG_WARN("g_blocked_path is not NULL [%s]", g_blocked_path2);
+               MS_DBG_SWARN("g_blocked_path is not NULL [%s]", g_blocked_path2);
                MS_SAFE_FREE(g_blocked_path2);
        }
 
old mode 100755 (executable)
new mode 100644 (file)
index 81f2a2c..de921a0
@@ -161,7 +161,7 @@ void _msc_datadisc_vconf_cb(void *data)
                                goto END;
                        }
 
-                       MS_DBG("[disc path] %s", disc_path);
+                       MS_DBG_SLOG("[disc path] %s", disc_path);
                        memset(storage_path, 0x0, sizeof(storage_path));
                        SAFE_STRLCPY(storage_path, disc_path, sizeof(storage_path));
 
old mode 100755 (executable)
new mode 100644 (file)
index b173a8a..a3bc0ea
@@ -78,7 +78,7 @@ static int __msc_dir_scan(sqlite3 *handle, const char *storage_id, char *start_p
                }
 
                if (ms_check_scan_ignore(current_path, uid) != MS_MEDIA_ERR_NONE) {
-                       MS_DBG_ERR("%s is ignore", current_path);
+                       MS_DBG_SERR("%s is ignore", current_path);
                        MS_SAFE_FREE(current_path);
                        continue;
                }
@@ -469,7 +469,7 @@ static int __msc_make_file_list(char *file_path, GPtrArray **path_array, uid_t u
                /* check valid path */
                ret = ms_check_ignore_dir(path, uid);
                if (ret != MS_MEDIA_ERR_NONE) {
-                       MS_DBG_ERR("invalide path : %s", path);
+                       MS_DBG_SERR("invalide path : %s", path);
                        MS_SAFE_FREE(path);
                        continue;
                }
old mode 100755 (executable)
new mode 100644 (file)
index 54f8cf8..6201f5e
@@ -210,7 +210,7 @@ static void __ms_usb_add_event(const char *mount_path)
        ms_connect_db(&handle, uid);
 
        if (mount_path != NULL) {
-               MS_DBG_WARN("added path [%s]", mount_path);
+               MS_DBG_SWARN("added path [%s]", mount_path);
 
                __ms_get_added_storage_path(mount_path, &storage_id);
 
@@ -282,7 +282,7 @@ static void __ms_usb_remove_event(const char *mount_path)
                        memset(device_id, 0x0, sizeof(device_id));
                        ret = ms_get_storage_id(handle, mount_path, device_id, uid);
 
-                       MS_DBG_WARN("removed path [%s %s]", mount_path, device_id);
+                       MS_DBG_SWARN("removed path [%s %s]", mount_path, device_id);
 
                        if (ret == MS_MEDIA_ERR_NONE) {
                                ms_set_storage_validity(handle, device_id, 0, uid);
@@ -336,11 +336,11 @@ void ms_device_block_changed_cb(usb_device_h usb_device, char *action, void *use
        ms_sys_get_uid(&uid);
 
        if (!strcmp(action, "mounted")) {
-               MS_DBG_WARN("USB MOUNTED, mountpath : %s", mount_path);
+               MS_DBG_SWARN("USB MOUNTED, mountpath : %s", mount_path);
                ms_check_mediadb(uid, &is_reset);
                __ms_usb_add_event(mount_path);
        } else if (!strcmp(action, "blocked")) { /*unmount->blocked stop accessing usb in time*/
-               MS_DBG_WARN("USB blocked, mountpath : %s", mount_path);
+               MS_DBG_SWARN("USB blocked, mountpath : %s", mount_path);
                ms_check_mediadb(uid, &is_reset);
                if (!is_reset)
                        __ms_usb_remove_event(mount_path);
@@ -377,7 +377,7 @@ static int __ms_check_mounted_storage_list(GArray **added_list)
                                        if (0 == usb_device_list_get_first(list, &device) && device != NULL) {
                                                mount_path = usb_device_get_mountpath(device);
                                                if (mount_path != NULL) {
-                                                       MS_DBG_WARN("mount_path [%s]", mount_path);
+                                                       MS_DBG_SWARN("mount_path [%s]", mount_path);
                                                        storage_path = strdup(mount_path);
                                                        g_array_append_val(*added_list, storage_path);
                                                }
@@ -388,7 +388,7 @@ static int __ms_check_mounted_storage_list(GArray **added_list)
                                        if (0 == usb_device_list_get_next(list, &device) && device != NULL) {
                                                mount_path = usb_device_get_mountpath(device);
                                                if (mount_path != NULL) {
-                                                       MS_DBG_WARN("mount_path [%s]", mount_path);
+                                                       MS_DBG_SWARN("mount_path [%s]", mount_path);
                                                        storage_path = strdup(mount_path);
                                                        g_array_append_val(*added_list, storage_path);
                                                }
@@ -471,10 +471,10 @@ int ms_check_mounted_storage(uid_t uid)
                                        }
 
                                        if (db_storage_path != NULL) {
-                                               MS_DBG_WARN("%s %s", mounted_path, db_storage_path);
+                                               MS_DBG_SWARN("%s %s", mounted_path, db_storage_path);
                                                if (strcmp(mounted_path, db_storage_path)) {
                                                        /* update storage path */
-                                                       MS_DBG_WARN("update storage from %s to %s", db_storage_path, mounted_path);
+                                                       MS_DBG_SWARN("update storage from %s to %s", db_storage_path, mounted_path);
                                                        ret = ms_update_storage(handle, storage_id, mounted_path, uid);
                                                }
 
@@ -489,13 +489,13 @@ int ms_check_mounted_storage(uid_t uid)
                                                MS_SAFE_FREE(db_storage_path);
                                        } else {
                                                /* there is no information of this storage in Media DB */
-                                               MS_DBG_WARN("insert storage %s", mounted_path);
+                                               MS_DBG_SWARN("insert storage %s", mounted_path);
                                                ret = ms_insert_storage(handle, storage_id, mounted_path, uid);
                                                scan_type = MS_SCAN_ALL;
                                        }
                                } else {
                                        /* there is no information of this storage in Media DB */
-                                       MS_DBG_WARN("insert storage %s", mounted_path);
+                                       MS_DBG_SWARN("insert storage %s", mounted_path);
                                        ret = ms_insert_storage(handle, storage_id, mounted_path, uid);
                                        scan_type = MS_SCAN_ALL;
                                }
old mode 100755 (executable)
new mode 100644 (file)
index 974396a..f40bfc1
@@ -185,13 +185,13 @@ void _ms_datadisc_vconf_cb(void *data)
                        goto END;
                }
 
-               MS_DBG("[disc path] %s", disc_path);
+               MS_DBG_SLOG("[disc path] %s", disc_path);
                memset(mnt_path, 0x0, sizeof(mnt_path));
                SAFE_STRLCPY(mnt_path, disc_path, sizeof(mnt_path));
 
                if (disc_state == 1) {
                        MS_DBG_WARN("[DISC INSERTED][%s]", disc_type);
-                       MS_DBG_WARN("MOUNT PATH [%s]", mnt_path);
+                       MS_DBG_SWARN("MOUNT PATH [%s]", mnt_path);
 
                        /* update storage information into media DB */
                        ret = ms_check_storage(handle, DATADISC_STORAGE_ID, &storage_path, &validity, uid);
@@ -253,7 +253,7 @@ int ms_write_media_server_status(void)
 
        fp = fopen(path, "wt");
        if (fp == NULL) {
-               MS_DBG_ERR("fp is NULL. file name : %s", path);
+               MS_DBG_SERR("fp is NULL. file name : %s", path);
                return MS_MEDIA_ERR_INTERNAL;
        }
 
@@ -655,7 +655,7 @@ static int __ms_check_disc_status(void)
 
                if (strcmp(disc_type, valid_type) == 0) {
                        MS_DBG_WARN("[DISC INSERTED][%s]", disc_type);
-                       MS_DBG_WARN("MOUNT PATH [%s]", mnt_path);
+                       MS_DBG_SWARN("MOUNT PATH [%s]", mnt_path);
 
                        /* check mount path */
                        if (!ms_config_get_str(MS_DISC_PATH, &disc_path)) {
@@ -663,7 +663,7 @@ static int __ms_check_disc_status(void)
                                goto END;
                        }
 
-                       MS_DBG("[disc path] %s", disc_path);
+                       MS_DBG_SLOG("[disc path] %s", disc_path);
                        memset(mnt_path, 0x0, sizeof(mnt_path));
                        SAFE_STRLCPY(mnt_path, disc_path, sizeof(mnt_path));
 
old mode 100755 (executable)
new mode 100644 (file)
index 2be9423..5f6c41e
@@ -390,10 +390,10 @@ int ms_send_storage_scan_request_senior_mode(sqlite3 *handle)
        ret = ms_check_storage(handle, storage_id, &storage_path, &validity, uid);
        if (ret == 0) {
                if (storage_path != NULL) {
-                       MS_DBG_WARN("##[senior mode]####[path [%s], %s]###", path, storage_path);
+                       MS_DBG_SWARN("##[senior mode]####[path [%s], %s]###", path, storage_path);
                        if (strcmp(path, storage_path)) {
                                /* update storage path */
-                               MS_DBG_WARN("##[senior mode]update storage from %s to %s", storage_path, path);
+                               MS_DBG_SWARN("##[senior mode]update storage from %s to %s", storage_path, path);
                                ret = ms_update_storage(handle, storage_id, path, uid);
                        }
 
@@ -410,14 +410,14 @@ int ms_send_storage_scan_request_senior_mode(sqlite3 *handle)
                        MS_SAFE_FREE(storage_path);
                } else {
                        /* there is no information of this storage in Media DB */
-                       MS_DBG_WARN("##[senior mode]insert storage %s", path);
+                       MS_DBG_SWARN("##[senior mode]insert storage %s", path);
                        ret = ms_insert_storage(handle, storage_id, path, uid);
                        MS_DBG_WARN("##[senior mode]");
                        scan_type = MS_SCAN_ALL;
                }
        } else {
                /* there is no information of this storage in Media DB */
-               MS_DBG_WARN("##[senior mode]insert storage %s", path);
+               MS_DBG_SWARN("##[senior mode]insert storage %s", path);
                ret = ms_insert_storage(handle, storage_id, path, uid);
                MS_DBG_WARN("##[senior mode]");
                scan_type = MS_SCAN_ALL;