adjuct level of dlog messages 85/99485/1
authorYong Yeon Kim <yy9875.kim@samsung.com>
Wed, 23 Nov 2016 03:31:18 +0000 (12:31 +0900)
committerYong Yeon Kim <yy9875.kim@samsung.com>
Wed, 23 Nov 2016 05:04:48 +0000 (21:04 -0800)
Change-Id: Id1e142a1c409e87f61b48c7dd0b6c66a6a790292

21 files changed:
lib/media-util-noti-internal.c
packaging/media-server.spec
src/common/media-common-db-svc.c
src/common/media-common-external-storage.c
src/common/media-common-system.c
src/common/media-common-utils.c
src/scanner-v2/media-scanner-db-manage-v2.c
src/scanner-v2/media-scanner-device-block-v2.c
src/scanner-v2/media-scanner-extract-v2.c
src/scanner-v2/media-scanner-scan-v2.c
src/scanner-v2/media-scanner-v2.c
src/scanner/media-scanner-device-block.c
src/scanner/media-scanner-scan.c
src/scanner/media-scanner.c
src/server/media-server-db-manage.c
src/server/media-server-dcm.c
src/server/media-server-device-block.c
src/server/media-server-main.c
src/server/media-server-scanner.c
src/server/media-server-socket.c
src/server/media-server-thumb.c

index eea1aec..f13f423 100755 (executable)
@@ -135,7 +135,7 @@ int media_db_update_send_internal(int pid, /* mandatory */
                }
                return MS_MEDIA_ERR_INTERNAL;
        }
-       MSAPI_DBG_ERR("success send notification");
+       MSAPI_DBG_INFO("success send notification");
 
        g_object_unref(bus);
 
@@ -297,7 +297,7 @@ static int _find_handle(MediaNotiHandle handle, int *idx)
        if (handle_list_internal != NULL) {
                for (i = 0; i < handle_list_internal->len; i++) {
                        data = g_array_index(handle_list_internal , MediaNotiHandle, i);
-                       MSAPI_DBG_ERR("%x %x", handle, data);
+                       MSAPI_DBG_INFO("%x %x", handle, data);
                        if (data == handle) {
                                MSAPI_DBG("FIND HANDLE");
                                *idx = i;
index 7980a8d..8ac41fd 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       media-server
 Summary:    A server for media content management
-Version:    0.3.16
+Version:    0.3.17
 Release:    0
 Group:      Multimedia/Service
 License:    Apache-2.0
index baf3f81..6a514e6 100755 (executable)
@@ -1003,8 +1003,6 @@ int ms_get_storage_list(void **handle, GArray **storage_array)
                }
        }
 
-       MS_DBG_ERR("OK");
-
        *storage_array = g_array_new(FALSE, FALSE, sizeof(ms_stg_info_s*));
        if (count != 0) {
                for (i = 0; i < count; i++) {
index 964499a..83e278f 100755 (executable)
@@ -99,7 +99,7 @@ void update_lang(void)
                if (r == NULL) {
                        r = setlocale(LC_ALL, lang);
                        if (r != NULL)
-                               MS_DBG_ERR("*****appcore setlocale=%s", r);
+                               MS_DBG_WARN("*****appcore setlocale=%s", r);
                }
                free(lang);
        }
@@ -191,7 +191,7 @@ int ms_read_device_info(const char *root_path, char **device_uuid)
                        d = (struct linux_dirent *) (buf + bpos);
 
                        if (d->d_type == DT_REG && (strncmp(d->d_name, DEVICE_INFO_FILE, strlen(DEVICE_INFO_FILE)) == 0)) {
-                               MS_DBG_ERR("FIND DEV INFO : %s", d->d_name);
+                               MS_DBG_WARN("FIND DEV INFO : %s", d->d_name);
                                bpos += d->d_reclen;
                                find_uuid = TRUE;
                                goto FIND_UUID;
@@ -206,7 +206,7 @@ FIND_UUID:
                len = strlen(d->d_name + strlen(DEVICE_INFO_FILE));
                if (len > 0) {
                        *device_uuid = strndup(d->d_name + strlen(DEVICE_INFO_FILE), MS_UUID_SIZE -1);
-                       MS_DBG_ERR("[%s][DEV ID: %s]", root_path, *device_uuid);
+                       MS_DBG_WARN("[%s][DEV ID: %s]", root_path, *device_uuid);
                }
        } else {
                ret = MS_MEDIA_ERR_FILE_NOT_EXIST;
index 43112c2..454c306 100755 (executable)
@@ -92,40 +92,38 @@ static void __ms_block_changed(GDBusConnection* connection,
 
        tmp = g_variant_get_child_value(parameters, 0);
        block_info->block_type = g_variant_get_int32(tmp);
-       MS_DBG_ERR("block_type : %d", block_info->block_type);
+       MS_DBG_INFO("block_type : %d", block_info->block_type);
 
        tmp = g_variant_get_child_value(parameters, 1);
        devnode = g_variant_get_string(tmp, &size);
-       MS_DBG_ERR("devnode : %s", devnode);
+       MS_DBG_INFO("devnode : %s", devnode);
 
        tmp = g_variant_get_child_value(parameters, 6);
        mount_uuid = g_variant_get_string(tmp, &size);
        if (mount_uuid != NULL) {
                block_info->mount_uuid = strdup(mount_uuid);
-               MS_DBG_ERR("mount_uuid : %s", block_info->mount_uuid);
+               MS_DBG_INFO("mount_uuid : %s", block_info->mount_uuid);
        }
 
        tmp = g_variant_get_child_value(parameters, 8);
        mount_path = g_variant_get_string(tmp, &size);
        if (mount_path != NULL) {
                block_info->mount_path = strdup(mount_path);
-               MS_DBG_ERR("mount_point : %s", block_info->mount_path);
+               MS_DBG_INFO("mount_point : %s", block_info->mount_path);
        }
 
        tmp = g_variant_get_child_value(parameters, 9);
        block_info->state = g_variant_get_int32(tmp);
-       MS_DBG_ERR("state : %d", block_info->state);
+       MS_DBG_INFO("state : %d", block_info->state);
 
        tmp = g_variant_get_child_value(parameters, 11);
        block_info->flags = g_variant_get_int32(tmp);
-       MS_DBG_ERR("flags : %d", block_info->flags);
+       MS_DBG_INFO("flags : %d", block_info->flags);
 
        ((block_changed_cb)usr_cb)(block_info, usr_data);
        MS_SAFE_FREE(block_info->mount_path);
        MS_SAFE_FREE(block_info->mount_uuid);
        MS_SAFE_FREE(block_info);
-
-       MS_DBG_ERR("user callback done");
 }
 #endif
 
@@ -426,7 +424,7 @@ 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_ERR("mount_path [%s]", mount_path);
+                                                       MS_DBG_WARN("mount_path [%s]", mount_path);
                                                }
                                        }
                                } else {
@@ -434,7 +432,7 @@ int ms_sys_get_device_list(ms_stg_type_e stg_type, GArray **dev_list)
                                        if(device != NULL) {
                                                mount_path = usb_device_get_mountpath(device);
                                                if (mount_path != NULL) {
-                                                       MS_DBG_ERR("mount_path [%s]", mount_path);
+                                                       MS_DBG_WARN("mount_path [%s]", mount_path);
                                                }
                                        }
                                }
index cf5dca6..5c4eb15 100755 (executable)
@@ -78,7 +78,7 @@ bool ms_is_mmc_inserted(void)
        ret = ms_sys_get_device_list(stg_type, &dev_list);
        if (ret == MS_MEDIA_ERR_NONE) {
                if (dev_list != NULL) {
-                       MS_DBG_ERR("MMC FOUND[%d]", dev_list->len);
+                       MS_DBG_WARN("MMC FOUND[%d]", dev_list->len);
                        ms_sys_release_device_list(&dev_list);
                        ret = TRUE;
                } else {
@@ -565,7 +565,7 @@ int ms_check_scan_ignore(char * path)
 
                struct stat folder_st;
                if (stat(path, &folder_st) == 0) {
-                       MS_DBG_ERR("DEV[%ld] INODE[%lld] UID[%ld] GID[%ld] MODE[%lo] PATH[%s]", (long)folder_st.st_dev, (long long)folder_st.st_ino,
+                       MS_DBG_WARN("DEV[%ld] INODE[%lld] UID[%ld] GID[%ld] MODE[%lo] PATH[%s]", (long)folder_st.st_dev, (long long)folder_st.st_ino,
                                (long)folder_st.st_uid, (long)folder_st.st_gid, (unsigned long) folder_st.st_mode, path);
                } else {
                        MS_DBG_ERR("%s folder stat fails", path);
@@ -584,7 +584,7 @@ int ms_check_scan_ignore(char * path)
 
                        exist = open(check_ignore_file, O_RDONLY);
                        if (exist >= 0) {
-                               MS_DBG_ERR("scan_ignore exists [%s]", check_ignore_file);
+                               MS_DBG_WARN("scan_ignore exists [%s]", check_ignore_file);
                                ret = MS_MEDIA_ERR_INVALID_PATH;
                        }
 
@@ -704,7 +704,7 @@ bool ms_storage_mount_status(const char* start_path)
 
        storage_path = strndup(start_path, strlen(start_path) - remain_len);
 
-       MS_DBG_ERR("storage_path [%s]", storage_path);
+       MS_DBG_WARN("storage_path [%s]", storage_path);
 
        err = usb_device_get_device_list(USB_MASS_STORAGE, &list);
        if (err == 0) {
@@ -714,10 +714,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_ERR("mount_path [%s]", mount_path);
+                                       MS_DBG_WARN("mount_path [%s]", mount_path);
                                        if (strlen(mount_path) == strlen(storage_path)) {
                                                if (strncmp(mount_path, storage_path, strlen(mount_path)) == 0) {
-                                                       MS_DBG_ERR("start path is mounted [%s]", start_path);
+                                                       MS_DBG_WARN("start path is mounted [%s]", start_path);
                                                        ret = true;
                                                }
                                        }
@@ -729,10 +729,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_ERR("mount_path [%s]", mount_path);
+                                                       MS_DBG_WARN("mount_path [%s]", mount_path);
                                                        if (strlen(mount_path) == strlen(storage_path)) {
                                                                if (strncmp(mount_path, storage_path, strlen(mount_path)) == 0) {
-                                                                       MS_DBG_ERR("start path is mounted [%s]", start_path);
+                                                                       MS_DBG_WARN("start path is mounted [%s]", start_path);
                                                                        ret = true;
                                                                        break;
                                                                }
index 332bbab..bf49765 100755 (executable)
@@ -49,9 +49,9 @@ int msc_check_db_size(uid_t uid, int scan_type)
                if (db_size >= MEDIA_DB_SIZE_LIMIT_2) {\r
                        MS_DBG_ERR("DB SIZE [%lf] reach the MEDIA_DB_SIZE_LIMIT_2[%lf]", db_size, MEDIA_DB_SIZE_LIMIT_2);\r
 \r
-                       MS_DBG_ERR("START REMOVE INVALID DATA");\r
+                       MS_DBG_WARN("START REMOVE INVALID DATA");\r
                        msc_cleanup_invalid_values(uid);\r
-                       MS_DBG_ERR("END REMOVE INVALID DATA");\r
+                       MS_DBG_WARN("END REMOVE INVALID DATA");\r
 \r
                        ms_check_size_mediadb(uid, &db_size);\r
                        if (db_size >= MEDIA_DB_SIZE_LIMIT_2) {\r
@@ -107,7 +107,7 @@ static int __msc_get_invalid_storage(void *handle, GArray **storage_list)
        while(sqlite3_step(sql_stmt) == SQLITE_ROW)\r
        {\r
                storage_uuid = strdup((const char *)sqlite3_column_text(sql_stmt, 0));\r
-               MS_DBG_ERR("INVALID STORAGE ID : %s", storage_uuid);\r
+               MS_DBG_WARN("INVALID STORAGE ID : %s", storage_uuid);\r
                g_array_append_val (*storage_list, storage_uuid);\r
        }\r
 \r
index 9c060fc..02a6517 100755 (executable)
@@ -37,9 +37,9 @@
 #ifdef _USE_DEVICED_DBUS
 static void __msc_usb_remove_event(const char *mount_path)
 {
-       MS_DBG_ERR("===========================================================");
-       MS_DBG_ERR("USB REMOVED, mountpath : %s", mount_path);
-       MS_DBG_ERR("===========================================================");
+       MS_DBG_WARN("===========================================================");
+       MS_DBG_WARN("USB REMOVED, mountpath : %s", mount_path);
+       MS_DBG_WARN("===========================================================");
 
        int update_status = -1;
        int remain_request = 0;
@@ -59,7 +59,7 @@ static void __msc_usb_remove_event(const char *mount_path)
 
        if (msc_get_dir_scan_status(&status) == MS_MEDIA_ERR_NONE) {
                if (status == TRUE) {
-                       MS_DBG_ERR("Doing directory scanning. Set cancel path");
+                       MS_DBG_WARN("Doing directory scanning. Set cancel path");
                        msc_set_cancel_path(mount_path);
                }
                status = FALSE;
@@ -74,7 +74,7 @@ static void __msc_usb_remove_event(const char *mount_path)
 
        if (msc_get_dir_scan_status(&status) == MS_MEDIA_ERR_NONE) {
                if (status == true) {
-                       MS_DBG_ERR("Doing directory extracting. Set cancel path");
+                       MS_DBG_WARN("Doing directory extracting. Set cancel path");
                        msc_set_extract_cancel_path(mount_path);
                }
                status = FALSE;
@@ -107,14 +107,14 @@ void _msc_mmc_changed_event(const char *mount_path, ms_stg_status_e mount_status
 void msc_device_block_changed_cb(ms_block_info_s *block_info, void *user_data)
 {
        if (block_info->block_type == 0) {
-               MS_DBG_ERR("GET THE USB EVENT");
+               MS_DBG_WARN("GET THE USB EVENT");
                if (block_info->state == MS_STG_INSERTED) {
                        /*DO NOT THING*/
                } else {
                        __msc_usb_remove_event(block_info->mount_path);
                }
        } else {
-               MS_DBG_ERR("GET THE MMC EVENT");
+               MS_DBG_WARN("GET THE MMC EVENT");
                _msc_mmc_changed_event(block_info->mount_path, block_info->state);
        }
 }
@@ -127,7 +127,7 @@ extern bool g_directory_extract_processing;
 void msc_device_block_changed_cb(usb_device_h usb_device, char *action, void *user_data)
 {
        char *mount_path = NULL;
-       MS_DBG_ERR("_usb_event_callback BEGIN");
+       MS_DBG_WARN("_usb_event_callback BEGIN");
 
        if (!usb_device) {
                MS_DBG_ERR("usb_device is NULL");
@@ -143,9 +143,9 @@ void msc_device_block_changed_cb(usb_device_h usb_device, char *action, void *us
        mount_path = usb_device_get_mountpath(usb_device);
 
        if (!strcmp(action, "blocked")) {
-               MS_DBG_ERR("===========================================================");
-               MS_DBG_ERR("USB BLOCKED, mountpath : %s", mount_path);
-               MS_DBG_ERR("===========================================================");
+               MS_DBG_WARN("===========================================================");
+               MS_DBG_WARN("USB BLOCKED, mountpath : %s", mount_path);
+               MS_DBG_WARN("===========================================================");
                int status  = -1;
 
                if(!ms_config_get_int(VCONFKEY_FILEMANAGER_DB_STATUS, &status)) {
@@ -157,7 +157,7 @@ void msc_device_block_changed_cb(usb_device_h usb_device, char *action, void *us
                }
 
                if (g_directory_scan_processing2 != 0) {
-                       MS_DBG_ERR("Doing directory scanning. Set cancel path");
+                       MS_DBG_WARN("Doing directory scanning. Set cancel path");
                        msc_set_cancel_scan_item(mount_path, -1);
                }
 
@@ -166,13 +166,13 @@ void msc_device_block_changed_cb(usb_device_h usb_device, char *action, void *us
                }
 
                if (g_directory_extract_processing == true) {
-                       MS_DBG_ERR("Doing directory extracting. Set cancel path");
+                       MS_DBG_WARN("Doing directory extracting. Set cancel path");
                        msc_set_cancel_extract_item(mount_path, -1);
                }
        }
 
        free_usb_device_h(usb_device);
-       MS_DBG_ERR("_usb_event_callback END");
+       MS_DBG_WARN("_usb_event_callback END");
 
        return;
 }
index 61bb928..5c8d827 100755 (executable)
@@ -113,7 +113,7 @@ int msc_deinit_extract_thread()
 
 int __msc_folder_bulk_extract(void **handle, const char* storage_id, int storage_type, const char *path, int scan_type, int burst, int pid, uid_t uid, unsigned int *io_err_count)
 {
-       MS_DBG_ERR("begin of __msc_folder_bulk_extract");
+       MS_DBG_WARN("begin of __msc_folder_bulk_extract");
        int ret = MS_MEDIA_ERR_NONE;
        int tmp_ret = MS_MEDIA_ERR_NONE;
        GArray *data_array = NULL;
@@ -175,7 +175,7 @@ int __msc_folder_bulk_extract(void **handle, const char* storage_id, int storage
        g_array_free(data_array, FALSE);
        data_array = NULL;
 
-       MS_DBG_ERR("end of __msc_folder_bulk_extract");
+       MS_DBG_WARN("end of __msc_folder_bulk_extract");
        return ret;
 }
 
@@ -199,7 +199,7 @@ gboolean msc_folder_extract_thread(void *data)
                        goto _POWEROFF;
                }
 
-               MS_DBG_ERR("DIRECTORY EXTRACT START [%s %d]", extract_data->msg, extract_data->msg_type);
+               MS_DBG_WARN("DIRECTORY EXTRACT START [%s %d]", extract_data->msg, extract_data->msg_type);
 
                io_err_count = 0;
 
@@ -283,7 +283,7 @@ NEXT:
                msc_del_cur_extract_item();
                msc_del_cancel_extract_item();
 
-               MS_DBG_ERR("DIRECTORY EXTRACT END [%d]", ret);
+               MS_DBG_WARN("DIRECTORY EXTRACT END [%d]", ret);
 
                ms_storage_scan_status_e storage_scan_status = MS_STORAGE_SCAN_NONE;
                ret = __msc_get_storage_extract_status(&storage_scan_status);
@@ -291,7 +291,7 @@ NEXT:
                        /*get storage list and scan status from media db*/
                        if (storage_scan_status != MS_STORAGE_SCAN_COMPLETE) {
                                __msc_resume_extract();
-                               MS_DBG_ERR("extract RESUME OK");
+                               MS_DBG_WARN("extract RESUME OK");
                        }
                }
 
@@ -337,7 +337,7 @@ gboolean msc_storage_extract_thread(void *data)
 
                io_err_count = 0;
                
-               MS_DBG_ERR("STORAGE extract START extract len is %d ",  g_async_queue_length(storage_extract_queue));
+               MS_DBG_WARN("STORAGE extract START extract len is %d ",         g_async_queue_length(storage_extract_queue));
 
                scan_type = extract_data->msg_type;
                if (scan_type != MS_MSG_STORAGE_ALL
@@ -352,14 +352,13 @@ gboolean msc_storage_extract_thread(void *data)
 
                /*connect to media db, if conneting is failed, db updating is stopped*/
                err = ms_connect_db(&handle, uid);
-
                if (err != MS_MEDIA_ERR_NONE) {
                        MS_DBG_ERR("ms_connect_db falied!");
                        continue;
                }
 
                update_path = strndup(extract_data->msg, extract_data->msg_size);
-               MS_DBG_ERR("extract storage_id is [%s], path [%s]", extract_data->storage_id, update_path);
+               MS_DBG_WARN("extract storage_id is [%s], path [%s]", extract_data->storage_id, update_path);
 
                ms_set_storage_scan_status(handle, extract_data->storage_id, MEDIA_EXTRACT_PROCESSING, uid);
                __msc_extract_set_db_status(MS_DB_UPDATING);
@@ -386,9 +385,9 @@ gboolean msc_storage_extract_thread(void *data)
 
                msc_del_extract_blocked_path();
 
-               MS_DBG_ERR("extract PAUSE");
+               MS_DBG_WARN("extract PAUSE");
                __msc_pause_extract();
-               MS_DBG_ERR("extract RESUME");
+               MS_DBG_WARN("extract RESUME");
 
                if (ret == MS_MEDIA_ERR_SCANNER_FORCE_STOP) {
                        ms_set_storage_scan_status(handle, extract_data->storage_id, MEDIA_EXTRACT_STOP, uid);
@@ -396,7 +395,7 @@ gboolean msc_storage_extract_thread(void *data)
                        /* set vconf key db extract status */
                        __msc_extract_set_db_status(MS_DB_STOPPED);
                } else if (extract_data->result == TRUE) {
-                       MS_DBG_ERR("extract_data->result == TRUE, MS_STORAGE_SCAN_COMPLETE");
+                       MS_DBG_WARN("extract_data->result == TRUE, MS_STORAGE_SCAN_COMPLETE");
                        ms_set_storage_scan_status(handle, extract_data->storage_id, MEDIA_EXTRACT_COMPLETE, uid);
                        __msc_set_storage_extract_status(MS_STORAGE_SCAN_COMPLETE);
                        /* set vconf key db extract status */
@@ -478,7 +477,7 @@ NEXT:
 
                MS_SAFE_FREE(extract_data);
 
-               MS_DBG_ERR("STORAGE EXTRACT END[%d]", ret);
+               MS_DBG_WARN("STORAGE EXTRACT END[%d]", ret);
        }                       /*thread while*/
 
 _POWEROFF:
@@ -580,7 +579,7 @@ int _msc_set_extract_item(s_extract_item** item, const char* path, int pid)
        } else {
                extract_item = (s_extract_item*)malloc(sizeof(s_extract_item));
                if(extract_item == NULL) {
-                       MS_DBG_ERR("malloc item failed...");
+                       MS_DBG_ERR("malloc item failed");
                        return MS_MEDIA_ERR_INTERNAL;
                }
                memset(extract_item, 0, sizeof(s_extract_item));
@@ -590,7 +589,7 @@ int _msc_set_extract_item(s_extract_item** item, const char* path, int pid)
        extract_item->pid = pid;
        *item = extract_item;
 
-       MS_DBG_ERR("_msc_set_extract_item path[%s],pid[%d]", extract_item->path, extract_item->pid);
+       MS_DBG_WARN("_msc_set_extract_item path[%s],pid[%d]", extract_item->path, extract_item->pid);
        return MS_MEDIA_ERR_NONE;
 }
 
@@ -607,7 +606,7 @@ int _msc_del_extract_item(s_extract_item** item)
 int msc_set_cancel_extract_item(const char* cancel_path, int pid)
 {
        int ret = -1;
-       MS_DBG_ERR("msc_set_cancel_extract_item begin");
+       MS_DBG_WARN("msc_set_cancel_extract_item begin");
        g_mutex_lock(&extract_item_mutex);
        if(cancel_path == NULL) {
                MS_DBG_ERR("cancel_path invalid...");
@@ -621,7 +620,7 @@ int msc_set_cancel_extract_item(const char* cancel_path, int pid)
        }
        g_mutex_unlock(&extract_item_mutex);
 
-       MS_DBG_ERR("msc_set_cancel_extract_item end");
+       MS_DBG_WARN("msc_set_cancel_extract_item end");
        return ret;
 }
 
@@ -709,10 +708,10 @@ static int __msc_check_extract_stop_status(int scan_type, ms_storage_type_t stor
                /* check cancel path */
                //MS_DBG_ERR("__msc_check_extract_stop_status...");
                if ((cancel_extract_item != NULL) && (cancel_extract_item->path != NULL)) {
-                       MS_DBG_ERR("check cancel storage [%s][%s]", cancel_extract_item->path, start_path);
+                       MS_DBG_WARN("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_ERR("Receive cancel request [%s][%s]. STOP scan!!", cancel_extract_item->path, start_path);
+                               MS_DBG_WARN("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) {
@@ -733,15 +732,15 @@ static int __msc_check_extract_stop_status(int scan_type, ms_storage_type_t stor
 
        if (scan_type == MS_MSG_STORAGE_ALL || scan_type == MS_MSG_STORAGE_PARTIAL) {
                if (g_directory_extract_processing == true) {
-                       MS_DBG_ERR("Now directory extract is start. So, storage extract is stopped.");
+                       MS_DBG_WARN("Now directory extract is start. So, storage extract is stopped.");
                        __msc_pause_extract();
-                       MS_DBG_ERR("Now directory extract is end. So, storage extract is resumed.");
+                       MS_DBG_WARN("Now directory extract is end. So, storage extract is resumed.");
                }
 
                g_mutex_lock(&extract_blocked_mutex);
                /* check block path */
                if (g_extract_blocked_path != NULL) {
-                       MS_DBG_ERR("check blocked storage [%s][%s]", g_extract_blocked_path, start_path);
+                       MS_DBG_WARN("check blocked storage [%s][%s]", g_extract_blocked_path, start_path);
                        if (strncmp(start_path, g_extract_blocked_path, strlen(start_path)) == 0) {
                                MS_DBG_ERR("Receive blocked message[%s][%s]. STOP extract!!", g_extract_blocked_path, start_path);
                                ret = MS_MEDIA_ERR_SCANNER_FORCE_STOP;
index b452890..7c54eab 100755 (executable)
@@ -204,7 +204,7 @@ static int __msc_check_stop_status(int scan_type, ms_storage_type_t storage_type
                /* check cancel path */
                //MS_DBG_ERR("__msc_check_stop_status...");
                if ((cancel_scan_item != NULL) && (cancel_scan_item->path != NULL)) {
-                       MS_DBG_ERR("check blocked storage [%s][%s]", cancel_scan_item->path, start_path);
+                       MS_DBG_WARN("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);
@@ -230,7 +230,7 @@ static int __msc_check_stop_status(int scan_type, ms_storage_type_t storage_type
                g_mutex_lock(&blocked_mutex2);
                /* check cancel path */
                if (g_blocked_path2 != NULL) {
-                       MS_DBG_ERR("check blocked storage [%s][%s]", g_blocked_path2, start_path);
+                       MS_DBG_WARN("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);
@@ -269,7 +269,7 @@ static int __msc_dir_scan_for_folder(void **handle, const char *storage_id, cons
        insert_count_for_partial = 0;
        set_count_for_partial = 0;
 
-       MS_DBG_ERR("storage id [%s] start path [%s]", storage_id, start_path);
+       MS_DBG_WARN("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*));
@@ -301,7 +301,7 @@ static int __msc_dir_scan_for_folder(void **handle, const char *storage_id, cons
                        MS_DBG_ERR("insert folder failed");
                }
 
-               MS_DBG_ERR("ms_insert_folder insert path11112222[%s]", new_start_path);
+               MS_DBG_WARN("ms_insert_folder insert path11112222[%s]", new_start_path);
        }
 
        /*start db update. the number of element in the array , db update is complete.*/
@@ -586,7 +586,7 @@ static int __msc_dir_scan_for_storage(void **handle, const char *storage_id, con
        bool is_missing = false;
        ms_dir_scan_status_e scan_status = MS_DIR_SCAN_NONE;
 
-       MS_DBG_ERR("storage id [%s] start path [%s]", storage_id, start_path);
+       MS_DBG_WARN("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*));
@@ -813,7 +813,7 @@ NEXT_SCAN:
                        if (g_directory_scan_processing2 == DIR_SCAN_NON_SCAN) {
                                ret = __msc_get_null_scan_folder_list(handle, storage_id, NULL, dir_array);
 
-                               MS_DBG_ERR("no wait folder scan callback");
+                               MS_DBG_WARN("no wait folder scan callback");
 
                                if (ret != MS_MEDIA_ERR_NONE) {
                                        break;
@@ -823,7 +823,7 @@ NEXT_SCAN:
 
                                __msc_pause_scan();
 
-                               MS_DBG_ERR("wait folder scan callback");
+                               MS_DBG_WARN("wait folder scan callback");
 
                                __msc_remove_dir_scan_cb();
 
@@ -846,10 +846,10 @@ NEXT_SCAN:
        if ((g_directory_scan_processing2 != DIR_SCAN_NON_SCAN)
                && (__msc_dir_and_storage_scan_same_path(new_start_path) == MS_MEDIA_ERR_NONE)) {
                __msc_set_dir_scan_cb(__msc_dir_scan_cb);
-               MS_DBG_ERR("storage scan pause...\n");
+               MS_DBG_WARN("storage scan pause");
                __msc_pause_scan();
 
-               MS_DBG_ERR("wait folder scan callback");
+               MS_DBG_WARN("wait folder scan callback");
 
                __msc_remove_dir_scan_cb();
        }
@@ -895,7 +895,7 @@ int __msc_get_null_scan_folder_list(void **handle, const char *stroage_id, char
        ret = ms_get_null_scan_folder_list(handle, stroage_id, path, &cur_dir_array);
 
        if (ret == MS_MEDIA_ERR_NONE) {
-               MS_DBG_ERR("cur_dir_array->len = [%d]", cur_dir_array->len);
+               MS_DBG_WARN("cur_dir_array->len = [%d]", cur_dir_array->len);
                while (cur_dir_array->len != 0) {
                        current_path = g_array_index(cur_dir_array , char*, 0);
                        g_array_remove_index(cur_dir_array, 0);
@@ -1024,7 +1024,7 @@ static int __msc_db_update(void **handle, const char *storage_id, const ms_comm_
 
        /*if scan type is not MS_SCAN_NONE, check data in db. */
        if (scan_type != MS_MSG_STORAGE_INVALID) {
-               MS_DBG_ERR("INSERT");
+               MS_DBG_WARN("INSERT");
                start_path = strndup(scan_data->msg, scan_data->msg_size);
                if (scan_type == MS_MSG_DIRECTORY_SCANNING || scan_type == MS_MSG_DIRECTORY_SCANNING_NON_RECURSIVE) {
                        err = __msc_dir_scan_for_folder(handle, storage_id, start_path, storage_type, scan_type, scan_data->pid, scan_data->uid);
@@ -1036,7 +1036,7 @@ static int __msc_db_update(void **handle, const char *storage_id, const ms_comm_
                        MS_DBG_ERR("error : %d", err);
                }
        } else if (scan_type == MS_MSG_STORAGE_INVALID) {
-               MS_DBG_ERR("INVALID");
+               MS_DBG_WARN("INVALID");
                msc_remove_extract_request(scan_data);
        }
 
@@ -1081,7 +1081,7 @@ gboolean msc_directory_scan_thread(void *data)
                        goto _POWEROFF;
                }
 
-               MS_DBG_ERR("DIRECTORY SCAN START [%s, %d]", scan_data->msg, scan_data->msg_type);
+               MS_DBG_WARN("DIRECTORY SCAN START [%s, %d]", scan_data->msg, scan_data->msg_type);
 
                msc_set_cur_scan_item(scan_data->msg, scan_data->pid);
                g_directory_scan_processing2 = DIR_SCAN_NON_RECURSIVE;
@@ -1134,10 +1134,10 @@ gboolean msc_directory_scan_thread(void *data)
                        if (ms_check_folder_exist(handle, storage_id, scan_data->msg) == MS_MEDIA_ERR_NONE) {
                                /*already exist in media DB*/
                                noti_type = MS_ITEM_UPDATE;
-                               MS_DBG_ERR("[%s] already exist", scan_data->msg);
+                               MS_DBG_WARN("[%s] already exist", scan_data->msg);
                        } else {
                                noti_type = MS_ITEM_INSERT;
-                               MS_DBG_ERR("[%s] new insert path", scan_data->msg);
+                               MS_DBG_WARN("[%s] new insert path", scan_data->msg);
                        }
                } else {
                        /*directory is deleted*/
@@ -1149,21 +1149,21 @@ 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_ERR("[%s][%s] delete path", scan_data->msg, folder_uuid);
+                       MS_DBG_WARN("[%s][%s] delete path", scan_data->msg, folder_uuid);
                }
 
                ms_check_subfolder_count(handle, storage_id, scan_data->msg, &before_count);
-               MS_DBG_ERR("BEFORE COUNT[%d]", before_count);
+               MS_DBG_WARN("BEFORE COUNT[%d]", before_count);
 
                if (scan_type == MS_MSG_DIRECTORY_SCANNING) {
 
-                       MS_DBG_ERR("start recursive dir scan!!");
+                       MS_DBG_WARN("start recursive dir scan!!");
 
                        g_directory_scan_processing2 = DIR_SCAN_RECURSIVE;
                        err = __msc_check_scan_same_path(scan_data->msg);
 
                        if (MS_MEDIA_ERR_NONE == err) {
-                               MS_DBG_ERR("[%s] is scanning recursive, waiting...", scan_data->msg);
+                               MS_DBG_WARN("[%s] is scanning recursive, waiting...", scan_data->msg);
 
                                while (1) {
                                        sleep(1);
@@ -1184,7 +1184,7 @@ gboolean msc_directory_scan_thread(void *data)
                                }
 
                                index = 0;
-                               MS_DBG_ERR("[%s] scan done, wait finished", scan_data->msg);
+                               MS_DBG_WARN("[%s] scan done, wait finished", scan_data->msg);
                                goto SCAN_DONE;
 
                        } else {
@@ -1197,23 +1197,23 @@ gboolean msc_directory_scan_thread(void *data)
                                }
                        }
                } else {
-                       MS_DBG_ERR("start non recursive dir scan!!");
+                       MS_DBG_WARN("start non recursive dir scan!!");
 
                        g_directory_scan_processing2 = DIR_SCAN_NON_RECURSIVE;
                        ms_check_folder_modified(handle, scan_data->msg, storage_id, &modified);
 
                        if (modified == FALSE) {
-                               MS_DBG_ERR("check [%s] has not been modified !!", scan_data->msg);
+                               MS_DBG_WARN("check [%s] has not been modified !!", scan_data->msg);
                                ms_get_folder_scan_status(handle, storage_id, scan_data->msg, (int*)&scan_status);
-                               MS_DBG_ERR("folder scan status = [%d]", scan_status);
+                               MS_DBG_WARN("folder scan status = [%d]", scan_status);
 
                                if (scan_status == MS_DIR_SCAN_DONE) {
                                        /* do nothing */
-                                       MS_DBG_ERR("[%s] scan done", scan_data->msg);
+                                       MS_DBG_WARN("[%s] scan done", scan_data->msg);
                                        err = ms_set_folder_item_validity(handle, storage_id, scan_data->msg, MS_VALIND, MS_NON_RECURSIVE, uid);
                                        goto SCAN_DONE;
                                } else if (scan_status == MS_DIR_SCAN_PROCESSING) {
-                                       MS_DBG_ERR("[%s] scanning, waiting...", scan_data->msg);
+                                       MS_DBG_WARN("[%s] scanning, waiting...", scan_data->msg);
 
                                        while (1) {
                                                sleep(1);
@@ -1229,24 +1229,24 @@ gboolean msc_directory_scan_thread(void *data)
 
                                                ms_get_folder_scan_status(handle, storage_id, scan_data->msg, (int*)&scan_status);
                                                if ((scan_status == MS_DIR_SCAN_DONE ) || (scan_status == MS_DIR_SCAN_STOP)) {
-                                                       MS_DBG_ERR("[%s] scan status [%d]!!!", scan_data->msg, scan_status);
+                                                       MS_DBG_WARN("[%s] scan status [%d]!!!", scan_data->msg, scan_status);
                                                        break;
                                                }
                                        }
 
                                        index = 0;
                                        if (scan_status == MS_DIR_SCAN_DONE) {
-                                               MS_DBG_ERR("[%s] scan done, wait finished", scan_data->msg);
+                                               MS_DBG_WARN("[%s] scan done, wait finished", scan_data->msg);
                                                goto SCAN_DONE;
                                        } else {
-                                               MS_DBG_ERR("set folder item invalid");
+                                               MS_DBG_WARN("set folder item invalid");
                                                err = ms_set_folder_item_validity(handle, storage_id, scan_data->msg, MS_INVALID, MS_NON_RECURSIVE, uid);
                                        }
                                } else {
                                        err = ms_set_folder_item_validity(handle, storage_id, scan_data->msg, MS_INVALID, MS_NON_RECURSIVE, uid);
                                }
                        } else {
-                               MS_DBG_ERR("check [%s] has been modified !!", scan_data->msg);
+                               MS_DBG_WARN("check [%s] has been modified !!", scan_data->msg);
                                err = ms_set_folder_item_validity(handle, storage_id, scan_data->msg, MS_INVALID, MS_NON_RECURSIVE, uid);
 #if 0
                                ms_get_folder_scan_status(handle, storage_id, scan_data->msg, &scan_status);
@@ -1273,11 +1273,11 @@ gboolean msc_directory_scan_thread(void *data)
                /*call for bundle commit*/
                ms_bacth_commit_disable(handle, TRUE, TRUE, uid);
 
-               MS_DBG_ERR("folder scan done, sent cb event path = [%s]", scan_data->msg);
+               MS_DBG_WARN("folder scan done, sent cb event path = [%s]", scan_data->msg);
                __msc_call_dir_scan_cb();
 
                ms_check_subfolder_count(handle, storage_id, scan_data->msg, &after_count);
-               MS_DBG_ERR("AFTER COUNT[%d]", before_count);
+               MS_DBG_WARN("AFTER COUNT[%d]", before_count);
 
                if (ms_count_delete_items_in_folder(handle, storage_id, scan_data->msg, &delete_count) != MS_MEDIA_ERR_NONE) {
                        MS_DBG_ERR("counting invalid items failed");
@@ -1320,7 +1320,7 @@ gboolean msc_directory_scan_thread(void *data)
                ms_reset_delete_count();
 
 SCAN_DONE:
-               MS_DBG_ERR("storage_id = [%s], dir Path = [%s]", storage_id, scan_data->msg);
+               MS_DBG_WARN("storage_id = [%s], dir Path = [%s]", storage_id, scan_data->msg);
                msc_insert_exactor_request(scan_data->msg_type, TRUE, scan_data->storage_id, scan_data->msg, scan_data->pid, uid);
 
                if (power_off2) {
@@ -1343,7 +1343,7 @@ NEXT:
                msc_del_cur_scan_item();
                msc_del_cancel_scan_item();
 
-               MS_DBG_ERR("DIRECTORY SCAN END [%d]", ret);
+               MS_DBG_WARN("DIRECTORY SCAN END [%d]", ret);
 
                io_err_folder = 0;
 
@@ -1542,7 +1542,7 @@ int __msc_check_pvr_svc()
 
                        if (file != NULL) {
                                fclose( file );
-                               MS_DBG_ERR("PVR service is ready");
+                               MS_DBG_WARN("PVR service is ready");
                                break;
                        } else {
                                MS_DBG_ERR("Waiting PVR service");
@@ -1577,7 +1577,7 @@ gboolean msc_storage_scan_thread(void *data)
                        goto _POWEROFF;
                }
 
-               MS_DBG_ERR("STORAGE SCAN START [%s]", scan_data->msg);
+               MS_DBG_WARN("STORAGE SCAN START [%s]", scan_data->msg);
 
                scan_type = scan_data->msg_type;
                if (scan_type != MS_MSG_STORAGE_ALL
@@ -1670,7 +1670,7 @@ gboolean msc_storage_scan_thread(void *data)
                        ms_set_db_status(MS_DB_UPDATED, storage_type);
                }
 
-               MS_DBG_ERR("storage_id = [%s]", scan_data->storage_id);
+               MS_DBG_WARN("storage_id = [%s]", scan_data->storage_id);
                msc_insert_exactor_request(scan_type, TRUE, scan_data->storage_id, scan_data->msg, scan_data->pid, uid);
 
 NEXT:
@@ -1694,7 +1694,7 @@ NEXT:
 
                MS_SAFE_FREE(scan_data);
 
-               MS_DBG_ERR("STORAGE SCAN END[%d]", ret);
+               MS_DBG_WARN("STORAGE SCAN END[%d]", ret);
 
                io_err_storage = 0;
        }                       /*thread while*/
@@ -1817,7 +1817,7 @@ static int __msc_batch_insert(ms_msg_type_e current_msg, int pid, GArray *path_a
        /*call for bundle commit*/
        ms_bacth_commit_enable(handle, TRUE, FALSE, MS_NOTI_SWITCH_ON, pid);
 
-       MS_DBG_ERR("BULK REGISTER START");
+       MS_DBG_WARN("BULK REGISTER START");
 
        /* get the inserting file path from array and insert to db */
        for (i = 0; i < path_array->len; i++) {
@@ -1947,7 +1947,7 @@ FREE_RESOURCE:
                /* If register_files operation is stopped, there is no necessrty for sending result. */
                msc_send_result(ret, register_data);
 
-               MS_DBG_ERR("BULK REGISTER END [%d |%s]", ret, register_data->msg);
+               MS_DBG_WARN("BULK REGISTER END [%d |%s]", ret, register_data->msg);
 
                __msc_clear_file_list(path_array);
 
@@ -1993,7 +1993,7 @@ int _msc_set_scan_item(s_scan_item** item, const char* path, int pid)
        scan_item->pid = pid;
        *item = scan_item;
 
-       MS_DBG_ERR("path[%s],pid[%d]", scan_item->path, scan_item->pid);
+       MS_DBG_WARN("path[%s],pid[%d]", scan_item->path, scan_item->pid);
        return MS_MEDIA_ERR_NONE;
 }
 
@@ -2010,7 +2010,7 @@ int _msc_del_scan_item(s_scan_item** item)
 int msc_set_cancel_scan_item(const char* cancel_path, int pid)
 {
        int ret = -1;
-       MS_DBG_ERR("msc_set_cancel_scan_item begin");
+       MS_DBG_WARN("msc_set_cancel_scan_item begin");
        g_mutex_lock(&scan_item_mutex);
        if(cancel_path == NULL) {
                MS_DBG_ERR("cancel_path invalid...");
@@ -2018,8 +2018,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_ERR("cur_scan_item->path[%s], cur_scan_item->pid[%d]", cur_scan_item->path, cur_scan_item->pid);
-               MS_DBG_ERR("cancel_path[%s], pid[%d]", cancel_path, pid);
+               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);
                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);
                }
@@ -2028,7 +2028,7 @@ int msc_set_cancel_scan_item(const char* cancel_path, int pid)
        }
        g_mutex_unlock(&scan_item_mutex);
 
-       MS_DBG_ERR("msc_set_cancel_scan_item end");
+       MS_DBG_WARN("msc_set_cancel_scan_item end");
        return ret;
 }
 
@@ -2068,7 +2068,7 @@ int msc_set_blocked_path(const char *blocked_path)
        g_mutex_lock(&blocked_mutex2);
 
        if (g_blocked_path2 != NULL) {
-               MS_DBG_ERR("g_blocked_path is not NULL [%s]", g_blocked_path2);
+               MS_DBG_WARN("g_blocked_path is not NULL [%s]", g_blocked_path2);
                free(g_blocked_path2);
                g_blocked_path2 = NULL;
        }
@@ -2089,7 +2089,7 @@ int msc_del_blocked_path(void)
        g_mutex_lock(&blocked_mutex2);
 
        if (g_blocked_path2 != NULL) {
-               MS_DBG_ERR("g_blocked_path is not NULL [%s]", g_blocked_path2);
+               MS_DBG_WARN("g_blocked_path is not NULL [%s]", g_blocked_path2);
                free(g_blocked_path2);
                g_blocked_path2 = NULL;
        }
index 10358ec..faea0c1 100755 (executable)
@@ -66,7 +66,7 @@ static void _power_off_cb(void* data)
        ms_comm_msg_s *scan_data;
        ms_comm_msg_s *reg_data;
 
-       MS_DBG_ERR("POWER OFF CB Begin");
+       MS_DBG_WARN("POWER OFF CB Begin");
 
        //display_lock_state(POWER_STATE_STANDBY, 0);
 
@@ -123,7 +123,7 @@ static void _power_off_cb(void* data)
                MS_DBG_ERR("set power off status to 1 failed");
        }
 
-       MS_DBG_ERR("POWER OFF END");
+       MS_DBG_WARN("POWER OFF END");
 }
 #endif
 
@@ -156,7 +156,7 @@ int main(int argc, char **argv)
        int err = -1;
        int fd = -1;
 
-       MS_DBG_ERR("[No-Error] ========== Scanner start ========");
+       MS_DBG_WARN("[No-Error] ========== Scanner start ========");
 
        __msc_add_event_receiver(NULL);
 
@@ -209,7 +209,7 @@ int main(int argc, char **argv)
        g_source_attach(source, context);
        g_source_unref(source);
 
-       MS_DBG_ERR("media_scanner_v2 set power_off2 to false...");
+       MS_DBG_WARN("media_scanner_v2 set power_off2 to false...");
        power_off2 = false;
 
        /*create each threads*/
@@ -227,9 +227,9 @@ int main(int argc, char **argv)
        MS_DBG_INFO("scanner v2 is ready");
 
        msc_send_ready();
-       MS_DBG_ERR("[No-Error] ========== Scanner is ready ========");
+       MS_DBG_WARN("[No-Error] ========== Scanner is ready ========");
 
-       MS_DBG_ERR("[No-Error] ========== Scanner is running  ========");
+       MS_DBG_WARN("[No-Error] ========== Scanner is running  ========");
 
 #ifdef _SET_VIP_PROCESS
        /*Set VIP Process*/
@@ -264,7 +264,7 @@ EXIT:
                MS_DBG_ERR("set power off status to 0 failed");
        }
 
-       MS_DBG_ERR("SCANNER V2 IS END");
+       MS_DBG_WARN("SCANNER V2 IS END");
        return 0;
 }
 
index 618e066..cac7e9e 100755 (executable)
@@ -63,14 +63,14 @@ void _msc_mmc_changed_event(const char *mount_path, ms_stg_status_e mount_status
 void msc_device_block_changed_cb(ms_block_info_s *block_info, void *user_data)
 {
        if (block_info->block_type == 0) {
-               MS_DBG_ERR("GET THE USB EVENT");
+               MS_DBG_WARN("GET THE USB EVENT");
                if (block_info->state == MS_STG_INSERTED) {
                        /*DO NOT THING*/
                } else {
                        __msc_usb_remove_event(block_info->mount_path);
                }
        } else {
-               MS_DBG_ERR("GET THE MMC EVENT");
+               MS_DBG_WARN("GET THE MMC EVENT");
                _msc_mmc_changed_event(block_info->mount_path, block_info->state);
        }
 }
@@ -93,9 +93,9 @@ void msc_device_block_changed_cb(usb_device_h usb_device, char *action, void *us
        mount_path = usb_device_get_mountpath(usb_device);
 
         if (!strcmp(action, "blocked")) {
-               MS_DBG_ERR("===========================================================");
-               MS_DBG_ERR("USB BLOCKED, mountpath : %s", mount_path);
-               MS_DBG_ERR("===========================================================");
+               MS_DBG_WARN("===========================================================");
+               MS_DBG_WARN("USB BLOCKED, mountpath : %s", mount_path);
+               MS_DBG_WARN("===========================================================");
                int status  = -1;
 
                if(!ms_config_get_int(VCONFKEY_FILEMANAGER_DB_STATUS, &status)) {
@@ -106,7 +106,7 @@ void msc_device_block_changed_cb(usb_device_h usb_device, char *action, void *us
                }
 
                if (g_directory_scan_processing == true) {
-                       MS_DBG_ERR("Doing directory scanning. Set cancel path");
+                       MS_DBG_WARN("Doing directory scanning. Set cancel path");
                        msc_set_cancel_path(mount_path);
                }
         }
index ac68490..b6ef0e8 100755 (executable)
@@ -131,7 +131,7 @@ static bool __msc_check_mount_storage(const char* start_path)
        if (dp != NULL) {
                ret = TRUE;
                closedir(dp);
-               MS_DBG_ERR("STORAGE IS MOUNTED[%s]", start_path);
+               MS_DBG_WARN("STORAGE IS MOUNTED[%s]", start_path);
        }
 
        return ret;
@@ -305,7 +305,7 @@ static int __msc_stg_scan(void **handle, const char *storage_id, const char*star
 
        g_array_append_val(dir_array, new_start_path);
 
-       MS_DBG_ERR("[No-Error] start path [%s]", new_start_path);
+       MS_DBG_WARN("start path [%s]", new_start_path);
 
        scan_function = (scan_type == MS_MSG_STORAGE_ALL) ? ms_insert_item_batch : ms_validate_item;
        is_recursive = (scan_type == MS_MSG_DIRECTORY_SCANNING_NON_RECURSIVE) ? false : true;
@@ -489,7 +489,7 @@ gboolean msc_directory_scan_thread(void *data)
                        goto _POWEROFF;
                }
 
-               MS_DBG_ERR("DIRECTORY SCAN START [%s %d]", scan_data->msg, scan_data->msg_type);
+               MS_DBG_WARN("DIRECTORY SCAN START [%s %d]", scan_data->msg, scan_data->msg_type);
 
                /*connect to media db, if conneting is failed, db updating is stopped*/
                ret = ms_connect_db(&handle, scan_data->uid);
@@ -538,10 +538,10 @@ gboolean msc_directory_scan_thread(void *data)
                        if (ms_check_folder_exist(handle, storage_id, scan_data->msg) == MS_MEDIA_ERR_NONE) {
                                /*already exist in media DB*/
                                noti_type = MS_ITEM_UPDATE;
-                               MS_DBG_ERR("[%s] already exist", scan_data->msg);
+                               MS_DBG_WARN("[%s] already exist", scan_data->msg);
                        } else {
                                noti_type = MS_ITEM_INSERT;
-                               MS_DBG_ERR("[%s] new insert path", scan_data->msg);
+                               MS_DBG_WARN("[%s] new insert path", scan_data->msg);
                        }
                } else {
                        /*directory is deleted*/
@@ -551,11 +551,11 @@ 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_ERR("[%s][%s] delete path", scan_data->msg, folder_uuid);
+                       MS_DBG_WARN("[%s][%s] delete path", scan_data->msg, folder_uuid);
                }
 
                ms_check_subfolder_count(handle, storage_id, scan_data->msg, &before_count);
-               MS_DBG_ERR("BEFORE COUNT[%d]", before_count);
+               MS_DBG_WARN("BEFORE COUNT[%d]", before_count);
 
                /* folder validity set 0 under the start_path in folder table*/
                if (ms_set_folder_validity(handle, storage_id, scan_data->msg, MS_INVALID, is_recursive, scan_data->uid) != MS_MEDIA_ERR_NONE) {
@@ -574,7 +574,7 @@ gboolean msc_directory_scan_thread(void *data)
                ret = __msc_dir_scan(handle, storage_id, start_path, storage_type, scan_data->msg_type, is_recursive, scan_data->uid);
 
                ms_check_subfolder_count(handle, storage_id, scan_data->msg, &after_count);
-               MS_DBG_ERR("BEFORE COUNT[%d]", before_count);
+               MS_DBG_WARN("BEFORE COUNT[%d]", before_count);
 
                if (ms_count_delete_items_in_folder(handle, storage_id, scan_data->msg, &delete_count) != MS_MEDIA_ERR_NONE) {
                        MS_DBG_ERR("counting invalid items failed");
@@ -842,7 +842,7 @@ gboolean msc_storage_scan_thread(void *data)
                }
 
                __msc_set_storage_scan_status(MS_STORAGE_SCAN_PROCESSING);
-               MS_DBG_ERR("[No-Error] STORAGE SCAN START [%s][%s]", scan_data->msg, scan_data->storage_id);
+               MS_DBG_WARN("STORAGE SCAN START [%s][%s]", scan_data->msg, scan_data->storage_id);
 
                scan_type = scan_data->msg_type;
                if (scan_type != MS_MSG_STORAGE_ALL
@@ -925,7 +925,7 @@ gboolean msc_storage_scan_thread(void *data)
 
                        /*if there is no delete content, do not call delete API*/
                        if (del_count != 0) {
-                               MS_DBG_ERR("storage thread delete count [%d]", del_count);
+                               MS_DBG_WARN("storage thread delete count [%d]", del_count);
                                ms_delete_invalid_items(handle, storage_id, storage_type, scan_data->uid);
                        }
                }
@@ -965,7 +965,7 @@ NEXT:
 
                MS_SAFE_FREE(scan_data);
 
-               MS_DBG_ERR("STORAGE SCAN END[%d]", ret);
+               MS_DBG_WARN("STORAGE SCAN END[%d]", ret);
        }                       /*thread while*/
 
 _POWEROFF:
@@ -1085,7 +1085,7 @@ static int __msc_batch_insert(ms_msg_type_e current_msg, int pid, GArray *path_a
        /*call for bundle commit*/
        ms_bacth_commit_enable(handle, TRUE, FALSE, MS_NOTI_SWITCH_ON, pid);
 
-       MS_DBG_ERR("BULK REGISTER START[%d]", pid);
+       MS_DBG_WARN("BULK REGISTER START[%d]", pid);
 
        /* get the inserting file path from array and insert to db */
        for (i = 0; i < path_array->len; i++) {
@@ -1213,7 +1213,7 @@ FREE_RESOURCE:
                /* If register_files operation is stopped, there is no necessrty for sending result. */
                msc_send_result(ret, register_data);
 
-               MS_DBG_ERR("BULK REGISTER END [%d |%s]", ret, register_data->msg);
+               MS_DBG_WARN("BULK REGISTER END [%d |%s]", ret, register_data->msg);
 
                __msc_clear_file_list(path_array);
 
@@ -1243,7 +1243,7 @@ _POWEROFF:
 int msc_set_cancel_path(const char *cancel_path)
 {
        if (g_cancel_path != NULL) {
-               MS_DBG_ERR("g_cancel_path is not NULL");
+               MS_DBG_WARN("g_cancel_path is not NULL");
                free(g_cancel_path);
                g_cancel_path = NULL;
        }
@@ -1323,7 +1323,7 @@ static int __msc_dir_scan_meta_update(void **handle, const char*start_path, cons
                                        }
 
                                        /* insert into media DB */
-                                       MS_DBG_ERR("%s", path);
+                                       MS_DBG_WARN("%s", path);
                                        if (scan_function(handle, path, storage_id, uid) != MS_MEDIA_ERR_NONE) {
                                                MS_DBG_ERR("failed to update db");
                                                continue;
@@ -1575,7 +1575,7 @@ int msc_remove_dir_scan_request(ms_comm_msg_s *recv_msg)
        ms_comm_msg_s *msg = NULL;
        GAsyncQueue *temp_scan_queue = NULL;
 
-       MS_DBG_ERR("scan_req_mutex is LOCKED");
+       MS_DBG_WARN("scan_req_mutex is LOCKED");
        g_mutex_lock(&scan_req_mutex);
 
        if (len == 0) {
@@ -1601,7 +1601,7 @@ int msc_remove_dir_scan_request(ms_comm_msg_s *recv_msg)
 
 END_REMOVE_REQUEST:
        g_mutex_unlock(&scan_req_mutex);
-       MS_DBG_ERR("scan_req_mutex is UNLOCKED");
+       MS_DBG_WARN("scan_req_mutex is UNLOCKED");
 
        return MS_MEDIA_ERR_NONE;
 }
@@ -1612,7 +1612,7 @@ int msc_set_blocked_path(const char *blocked_path)
        g_mutex_lock(&blocked_mutex);
 
        if (g_blocked_path != NULL) {
-               MS_DBG_ERR("g_blocked_path is not NULL [%s]", g_blocked_path);
+               MS_DBG_WARN("g_blocked_path is not NULL [%s]", g_blocked_path);
                free(g_blocked_path);
                g_blocked_path = NULL;
        }
@@ -1630,7 +1630,7 @@ int msc_del_blocked_path(void)
        g_mutex_lock(&blocked_mutex);
 
        if (g_blocked_path != NULL) {
-               MS_DBG_ERR("g_blocked_path is not NULL [%s]", g_blocked_path);
+               MS_DBG_WARN("g_blocked_path is not NULL [%s]", g_blocked_path);
                free(g_blocked_path);
                g_blocked_path = NULL;
        }
index 91b2138..ffb40a1 100755 (executable)
@@ -117,9 +117,9 @@ int main(int argc, char **argv)
 
        msc_send_ready();
 
-       MS_DBG_ERR("*****************************************");
-       MS_DBG_ERR("*** Scanner is running ***");
-       MS_DBG_ERR("*****************************************");
+       MS_DBG_WARN("*****************************************");
+       MS_DBG_WARN("*** Scanner is running ***");
+       MS_DBG_WARN("*****************************************");
 
        g_main_loop_run(scanner_mainloop);
 
index 563e315..e488d71 100755 (executable)
@@ -78,11 +78,11 @@ static int __ms_remake_mediadb(uid_t uid)
        \r
        ms_connect_db(&handle, uid);\r
 \r
-       MS_DBG_ERR("START WRITE SCHEMA");\r
+       MS_DBG_WARN("START WRITE SCHEMA");\r
        if (ms_check_db_upgrade(handle, uid)  != MS_MEDIA_ERR_NONE) {\r
                MS_DBG_ERR("ms_check_db_upgrade fail");\r
        }\r
-       MS_DBG_ERR("END WRITE SCHEMA");\r
+       MS_DBG_WARN("END WRITE SCHEMA");\r
        \r
        /*disconnect form media db*/\r
        if (handle) ms_disconnect_db(&handle);\r
@@ -101,9 +101,10 @@ int ms_check_mediadb(uid_t uid, bool *is_reset)
 \r
        ms_check_size_mediadb(uid, &db_size);\r
 \r
-       MS_DBG_ERR("[DB SIZE : %lf] [LIMIT1 : %lf] [LIMIT2 : %lf]", db_size, MEDIA_DB_SIZE_LIMIT_1, MEDIA_DB_SIZE_LIMIT_2);\r
+       MS_DBG_WARN("[DB SIZE : %lf] [LIMIT1 : %lf] [LIMIT2 : %lf]", db_size, MEDIA_DB_SIZE_LIMIT_1, MEDIA_DB_SIZE_LIMIT_2);\r
        if (db_size > MEDIA_DB_SIZE_LIMIT_2) {\r
                MS_DBG_ERR("THE SIZE OF MEDIA DB REACH THE LIMIT. RESET MEDIA DB.");\r
+               MS_DBG_ERR("[DB SIZE : %lf] [LIMIT1 : %lf] [LIMIT2 : %lf]", db_size, MEDIA_DB_SIZE_LIMIT_1, MEDIA_DB_SIZE_LIMIT_2);\r
                __ms_remake_mediadb(uid);\r
                *is_reset = TRUE;\r
        }\r
index 14bf155..f50e504 100644 (file)
@@ -224,7 +224,7 @@ gboolean _ms_dcm_agent_recv_dcm_done_from_server(GIOChannel *src, GIOCondition c
 
        dcmMsg recv_msg;
 
-       MS_DBG_ERR("DCM service SOCKET %d", dcm_serv_sockfd);
+       MS_DBG_WARN("DCM service SOCKET %d", dcm_serv_sockfd);
 
        ret = ms_ipc_receive_message(dcm_serv_sockfd, &recv_msg, sizeof(dcmMsg));
        if (ret != MS_MEDIA_ERR_NONE) {
index 7411569..a09e6c1 100755 (executable)
@@ -106,14 +106,14 @@ int ms_usb_insert_handler(const char *mount_path, const char *mount_uuid)
                                MS_DBG_ERR("ms_set_storage_scan_status failed");
                        }
 
-                       MS_DBG_ERR("init storage data in DB");
+                       MS_DBG_WARN("init storage data in DB");
                        /* update storage_id table set validity=0 first */
                        ms_validaty_change_all_items(handle, mount_uuid, MS_STORAGE_EXTERNAL, false, uid);
                        /*update folder table set validity = 0*/
                        ms_set_folder_validity(handle, mount_uuid, storage_path, MS_INVALID, TRUE, uid);
                        /* update folder table set scan_status=0 first */
                        ms_set_folder_scan_status(handle, mount_uuid, NULL, MS_DIR_SCAN_NONE, uid);
-                       MS_DBG_ERR("init storage data in DB end");
+                       MS_DBG_WARN("init storage data in DB end");
                } else {
                        /* there is no information of this storage in Media DB */
                        ret = ms_insert_storage(handle, mount_uuid, NULL, mount_path, uid);
@@ -343,7 +343,7 @@ int ms_mmc_remove_handler(const char *mount_path)
        }
 
        if (storage_path != NULL) {
-               MS_DBG_ERR("mmc_path[%s]", storage_path);
+               MS_DBG_WARN("mmc_path[%s]", storage_path);
 
                ms_set_storage_validity(handle, MMC_STORAGE_ID, 0, uid);
 
@@ -402,10 +402,10 @@ void _ms_usb_changed_event(const char *mount_path, const char *mount_uuid, ms_st
 void ms_device_block_changed_cb(ms_block_info_s *block_info, void *user_data)
 {
        if (block_info->block_type == 0) {
-               MS_DBG_ERR("GET THE USB EVENT");
+               MS_DBG_WARN("GET THE USB EVENT");
                _ms_usb_changed_event(block_info->mount_path, block_info->mount_uuid, block_info->state);
        } else {
-               MS_DBG_ERR("GET THE MMC EVENT");
+               MS_DBG_WARN("GET THE MMC EVENT");
                _ms_mmc_changed_event(block_info->mount_path, block_info->state, block_info->flags);
        }
 }
@@ -429,7 +429,7 @@ static void __ms_usb_add_event(const char *mount_path)
        ms_connect_db(&handle, uid);
 
        if (mount_path != NULL) {
-               MS_DBG_ERR("added path [%s]", mount_path);
+               MS_DBG_WARN("added path [%s]", mount_path);
 
                __ms_get_added_stroage_path(handle, mount_path, &storage_id);
 
@@ -501,7 +501,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);
 
-                       MS_DBG_ERR("removed path [%s %s]", mount_path, device_id);
+                       MS_DBG_WARN("removed path [%s %s]", mount_path, device_id);
 
                        if (ret == MS_MEDIA_ERR_NONE) {
                                ms_set_storage_validity(handle, device_id, 0, uid);
@@ -536,7 +536,7 @@ void ms_device_block_changed_cb(usb_device_h usb_device, char *action, void *use
        bool is_reset = FALSE;
        uid_t uid = MEDIA_DEFAULT_UID;
 
-       MS_DBG_ERR("usb_event_callback BEGIN[%s]", action);
+       MS_DBG_WARN("usb_event_callback BEGIN[%s]", action);
        if (!usb_device) {
                MS_DBG_ERR("usb_device is NULL");
                return;
@@ -553,11 +553,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_ERR("USB MOUNTED, mountpath : %s", mount_path);
+               MS_DBG_WARN("USB MOUNTED, mountpath : %s", mount_path);
                ms_check_mediadb(uid, &is_reset);
                __ms_usb_add_event(mount_path);
        } else if (!strcmp(action, "unmounted")) {
-               MS_DBG_ERR("USB UNMOUNTED, mountpath : %s", mount_path);
+               MS_DBG_WARN("USB UNMOUNTED, mountpath : %s", mount_path);
                ms_check_mediadb(uid, &is_reset);
                if (!is_reset) {
                        __ms_usb_remove_event(mount_path);
@@ -569,8 +569,7 @@ void ms_device_block_changed_cb(usb_device_h usb_device, char *action, void *use
        if (is_reset) {
                ms_check_mounted_storage(uid);
        }
-       MS_DBG_ERR("usb_event_callback END[%s]", action);
-
+       MS_DBG_WARN("usb_event_callback END[%s]", action);
 }
 
 static int __ms_check_mounted_storage_list(GArray **added_list)
@@ -597,7 +596,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_ERR("mount_path [%s]", mount_path);
+                                                       MS_DBG_WARN("mount_path [%s]", mount_path);
                                                        storage_path = strdup(mount_path);
                                                        g_array_append_val (*added_list, storage_path);
                                                }
@@ -608,7 +607,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_ERR("mount_path [%s]", mount_path);
+                                                       MS_DBG_WARN("mount_path [%s]", mount_path);
                                                        storage_path = strdup(mount_path);
                                                        g_array_append_val (*added_list, storage_path);
                                                }
@@ -698,10 +697,10 @@ int ms_check_mounted_storage(uid_t uid)
                                        }
 
                                        if (db_storage_path != NULL) {
-                                               MS_DBG_ERR("%s %s", mounted_path, db_storage_path);
+                                               MS_DBG_WARN("%s %s", mounted_path, db_storage_path);
                                                if (strcmp(mounted_path, db_storage_path)) {
                                                        /* update storage path */
-                                                       MS_DBG_ERR("update storage from %s to %s", db_storage_path, mounted_path);
+                                                       MS_DBG_WARN("update storage from %s to %s", db_storage_path, mounted_path);
                                                        ret = ms_update_storage(handle, storage_id, mounted_path, uid);
                                                }
 
@@ -716,13 +715,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_ERR("insert storage %s", mounted_path);
+                                               MS_DBG_WARN("insert storage %s", mounted_path);
                                                ret = ms_insert_storage(handle, storage_id, NULL, mounted_path, uid);
                                                scan_type = MS_SCAN_ALL;
                                        }
                                } else {
                                        /* there is no information of this storage in Media DB */
-                                       MS_DBG_ERR("insert storage %s", mounted_path);
+                                       MS_DBG_WARN("insert storage %s", mounted_path);
                                        ret = ms_insert_storage(handle, storage_id, NULL, mounted_path, uid);
                                        scan_type = MS_SCAN_ALL;
                                }
index a46487d..136704b 100644 (file)
@@ -84,11 +84,11 @@ bool __ms_deal_reset_status()
                return false;
        }
 
-       MS_DBG_ERR("db/media_server/reset_status is [%d]\n", value);
+       MS_DBG_WARN("db/media_server/reset_status is [%d]\n", value);
 
        if(value == 1 || value == 2)
        {
-               MS_DBG_ERR("POWER_OFF_REASON_FACTORY_RESET or SERVICE RESET");
+               MS_DBG_WARN("POWER_OFF_REASON_FACTORY_RESET or SERVICE RESET");
                
                ms_reset_mediadb(uid);
 
@@ -99,7 +99,7 @@ bool __ms_deal_reset_status()
                }
        }
 
-       MS_DBG_ERR("end of __ms_deal_reset_status\n");
+       MS_DBG_WARN("end of __ms_deal_reset_status\n");
 
        return true;
 }
@@ -171,7 +171,7 @@ void _ms_datadisc_vconf_cb(void *data)
        ret = ms_load_functions();
        if (ret != MS_MEDIA_ERR_NONE) {
                MS_DBG_ERR("ms_load_functions failed [%d]", ret);
-               return ret;
+               return;
        }
 
        /* request scanning */
@@ -186,7 +186,7 @@ void _ms_datadisc_vconf_cb(void *data)
                        goto END;
                }
 
-               MS_DBG_ERR("[DISC INSERTED][%s]",disc_type);
+               MS_DBG_WARN("[DISC INSERTED][%s]",disc_type);
 
                if (strcmp(disc_type, valid_type) == 0) {
                        /* check mount path */
@@ -197,7 +197,7 @@ void _ms_datadisc_vconf_cb(void *data)
 
                        memset(start_path, 0x0, sizeof(start_path));
                        strncpy(start_path, disc_path, sizeof(start_path)-1);
-                       MS_DBG_ERR("MOUNT PATH [%s]", start_path);
+                       MS_DBG_WARN("MOUNT PATH [%s]", start_path);
 
 
                        ret = ms_insert_storage(handle, MMC_STORAGE_ID, NULL, start_path, uid);
@@ -208,7 +208,7 @@ void _ms_datadisc_vconf_cb(void *data)
                        ms_send_storage_scan_request(start_path, MMC_STORAGE_ID, scan_type, uid);
                }
        } else {
-               MS_DBG_ERR("[DISC REMOVED]");
+               MS_DBG_WARN("[DISC REMOVED]");
                ms_set_storage_validity(handle, MMC_STORAGE_ID, 0, uid);
        }
 
@@ -294,16 +294,16 @@ void _ms_signal_handler(int n)
        while ((pid = waitpid(-1, &stat, WNOHANG)) > 0) {
                /* check pid of child process of thumbnail thread */
                if (pid == thumb_pid) {
-                       MS_DBG_ERR("[%d] Thumbnail server is stopped by media-server", pid);
+                       MS_DBG_WARN("[%d] Thumbnail server is stopped by media-server", pid);
                        ms_thumb_reset_server_status();
                } else if (pid == scanner_pid) {
-                       MS_DBG_ERR("[%d] Scanner is stopped by media-server", pid);
+                       MS_DBG_WARN("[%d] Scanner is stopped by media-server", pid);
                        ms_reset_scanner_status();
                } else if (pid == dcm_pid) {
-                       MS_DBG_ERR("[%d] DCM is stopped by media-server", pid);
+                       MS_DBG_WARN("[%d] DCM is stopped by media-server", pid);
                        ms_dcm_reset_server_status();
                } else {
-                       MS_DBG_ERR("[%d] is stopped", pid);
+                       MS_DBG_WARN("[%d] is stopped", pid);
                }
        }
 
@@ -417,13 +417,13 @@ int main(int argc, char **argv)
 
        ms_check_size_mediadb(uid, &db_size);
        ms_get_remain_space(&free_space);
-       MS_DBG_ERR("==========================");
-       MS_DBG_ERR("DB SIZE : %lf", db_size);
-       MS_DBG_ERR("DB LIMIT1   : %lf", MEDIA_DB_SIZE_LIMIT_1);
-       MS_DBG_ERR("DB LIMIT2   : %lf", MEDIA_DB_SIZE_LIMIT_2);
-       MS_DBG_ERR("FREE SPACE  : %lf", free_space);
-       MS_DBG_ERR("SPACE LIMIT : %lf", MEDIA_DB_SPACE_LIMIT);
-       MS_DBG_ERR("==========================");
+       MS_DBG_WARN("==========================");
+       MS_DBG_WARN("DB SIZE : %lf", db_size);
+       MS_DBG_WARN("DB LIMIT1   : %lf", MEDIA_DB_SIZE_LIMIT_1);
+       MS_DBG_WARN("DB LIMIT2   : %lf", MEDIA_DB_SIZE_LIMIT_2);
+       MS_DBG_WARN("FREE SPACE  : %lf", free_space);
+       MS_DBG_WARN("SPACE LIMIT : %lf", MEDIA_DB_SPACE_LIMIT);
+       MS_DBG_WARN("==========================");
 
        if (db_size > MEDIA_DB_SIZE_LIMIT_2) {
                MS_DBG_ERR("THE SIZE OF MEDIA DB REACH THE LIMIT. RESET MEDIA DB.");
@@ -467,7 +467,7 @@ int main(int argc, char **argv)
        /*Active flush */
        malloc_trim(0);
 
-       MS_DBG_ERR("*** Media Server is running ***");
+       MS_DBG_WARN("*** Media Server is running ***");
 
        ms_write_media_server_status();
 
@@ -490,7 +490,7 @@ int main(int argc, char **argv)
 
        __ms_free_global_variable();
 
-       MS_DBG_ERR("*** Media Server is stopped ***");
+       MS_DBG_WARN("*** Media Server is stopped ***");
 
        return 0;
 }
@@ -618,7 +618,7 @@ static int __ms_check_mmc_status(void)
        ret = ms_sys_get_device_list(stg_type, &dev_list);
        if (ret == MS_MEDIA_ERR_NONE) {
                if (dev_list != NULL) {
-                       MS_DBG_ERR("MMC FOUND[%d]", dev_list->len);
+                       MS_DBG_WARN("MMC FOUND[%d]", dev_list->len);
                        int i = 0 ;
                        int dev_num = dev_list->len;
                        ms_block_info_s *block_info = NULL;
@@ -650,7 +650,7 @@ static int __ms_check_usb_status(void)
        ret = ms_sys_get_device_list(stg_type, &dev_list);
        if (ret == MS_MEDIA_ERR_NONE) {
                if (dev_list != NULL) {
-                       MS_DBG_ERR("USB FOUND[%d]", dev_list->len);
+                       MS_DBG_WARN("USB FOUND[%d]", dev_list->len);
                        int i = 0 ;
                        int dev_num = dev_list->len;
                        ms_block_info_s *block_info = NULL;
index e28c5e5..e37ad49 100755 (executable)
@@ -141,7 +141,7 @@ static gboolean _ms_stop_scanner(gpointer user_data)
                if (kill(child_pid, SIGKILL) < 0) {
                        MS_DBG_ERR("kill failed[%d]", child_pid);
                }
-               MS_DBG_ERR("KILL SCANNER");
+               MS_DBG_WARN("KILL SCANNER");
        } else {
                MS_DBG_ERR("SCANNER IS ALREADY DEAD");
        }
@@ -150,7 +150,7 @@ static gboolean _ms_stop_scanner(gpointer user_data)
        scanner_ready = false;
        ms_req_num = 0;
 
-       MS_DBG_ERR("stop_scanner unlock...");
+       MS_DBG_WARN("stop_scanner unlock...");
        g_mutex_unlock(&scanner_mutex);
 
        return FALSE;
@@ -176,7 +176,7 @@ static int _ms_get_ini_config(const char *key)
 
 void ms_cleanup_scanner(void)
 {
-       MS_DBG_ERR("_ms_cleanup_scanner START");
+       MS_DBG_WARN("_ms_cleanup_scanner START");
        if (!scanner_cleaned) {
                if (g_mutex_trylock(&scanner_mutex)) {
                        close(fifo_fd);
@@ -193,7 +193,7 @@ void ms_cleanup_scanner(void)
                }
        }
 
-       MS_DBG_ERR("_ms_cleanup_scanner END");
+       MS_DBG_WARN("_ms_cleanup_scanner END");
 
        return;
 }
@@ -217,7 +217,7 @@ int ms_scanner_start(void)
        g_mutex_lock(&scanner_mutex);
 
        if (child_pid > 0) {
-               MS_DBG_ERR("media scanner is already started");
+               MS_DBG_WARN("media scanner is already started");
                g_mutex_unlock(&scanner_mutex);
                return MS_MEDIA_ERR_NONE;
        }
@@ -264,7 +264,7 @@ int ms_scanner_start(void)
                        GIOChannel *res_channel = NULL;
                        GMainContext *res_context = NULL;
 
-                       MS_DBG_ERR("[No-Error] SCANNER is ready");
+                       MS_DBG_WARN("[No-Error] SCANNER is ready");
 
                        scanner_ready = true;
                        scanner_cleaned = false;
@@ -317,7 +317,7 @@ bool ms_get_scanner_status(void)
 void ms_reset_scanner_status(void)
 {
        if (g_mutex_trylock(&scanner_mutex)) {
-               MS_DBG_ERR("ms_reset_scanner_status lock...");
+               MS_DBG_WARN("ms_reset_scanner_status lock...");
 
                child_pid = 0;
                scanner_ready = false;
index d3feb3b..bebb73c 100755 (executable)
@@ -250,11 +250,11 @@ static int __ms_recovery_media_db(uid_t uid)
        
        ms_connect_db(&handle, uid);
        
-       MS_DBG_ERR("START WRITE SCHEMA");
+       MS_DBG_WARN("START WRITE SCHEMA");
        if (ms_check_db_upgrade(handle, uid)  != MS_MEDIA_ERR_NONE) {
                MS_DBG_ERR("ms_check_db_upgrade fail");
        }
-       MS_DBG_ERR("END WRITE SCHEMA");
+       MS_DBG_WARN("END WRITE SCHEMA");
        
        /*disconnect form media db*/
        if (handle) ms_disconnect_db(&handle);
@@ -523,10 +523,10 @@ int ms_send_storage_scan_request_senior_mode(void **handle)
        ret = ms_check_storage(handle, storage_id, NULL, &storage_path, &validity);
        if (ret == 0) {
                if (storage_path != NULL) {
-                       MS_DBG_ERR("##[senior mode]####[path [%s], %s]###", path, storage_path);
+                       MS_DBG_WARN("##[senior mode]####[path [%s], %s]###", path, storage_path);
                        if (strcmp(path, storage_path)) {
                                /* update storage path */
-                               MS_DBG_ERR("##[senior mode]update storage from %s to %s", storage_path, path);
+                               MS_DBG_WARN("##[senior mode]update storage from %s to %s", storage_path, path);
                                ret = ms_update_storage(handle, storage_id, path, uid);
                        }
 
@@ -543,16 +543,16 @@ int ms_send_storage_scan_request_senior_mode(void **handle)
                        MS_SAFE_FREE(storage_path);
                } else {
                        /* there is no information of this storage in Media DB */
-                       MS_DBG_ERR("##[senior mode]insert storage %s", path);
+                       MS_DBG_WARN("##[senior mode]insert storage %s", path);
                        ret = ms_insert_storage(handle, storage_id, NULL, path, uid);
-                       MS_DBG_ERR("##[senior mode]");
+                       MS_DBG_WARN("##[senior mode]");
                        scan_type = MS_SCAN_ALL;
                }
        } else {
                /* there is no information of this storage in Media DB */
-               MS_DBG_ERR("##[senior mode]insert storage %s", path);
+               MS_DBG_WARN("##[senior mode]insert storage %s", path);
                ret = ms_insert_storage(handle, storage_id, NULL, path, uid);
-               MS_DBG_ERR("##[senior mode]");
+               MS_DBG_WARN("##[senior mode]");
                scan_type = MS_SCAN_ALL;
        }
 
@@ -732,7 +732,7 @@ void _ms_process_tcp_message(gpointer data, gpointer user_data)
 
        /* Disconnect DB*/
        media_db_disconnect(db_handle);
-       MS_DBG_ERR("END");
+
        if (g_atomic_int_dec_and_test(&cur_running_task) == FALSE)
                MS_DBG_ERR("g_atomic_int_dec_and_test failed");
 
@@ -753,7 +753,7 @@ ERROR:
 
        /* Disconnect DB*/
        media_db_disconnect(db_handle);
-       MS_DBG_ERR("END");
+
        if (g_atomic_int_dec_and_test(&cur_running_task) == FALSE)
                MS_DBG_ERR("g_atomic_int_dec_and_test failed");
 
index fc9c79c..e243aad 100644 (file)
@@ -383,7 +383,7 @@ gboolean _ms_thumb_agent_recv_thumb_done_from_server(GIOChannel *src, GIOConditi
 
        ms_thumb_server_msg recv_msg;
 
-       MS_DBG_ERR("THUMB SERVER SOCKET %d", thumb_serv_sockfd);
+       MS_DBG_WARN("THUMB SERVER SOCKET %d", thumb_serv_sockfd);
 
        ret = ms_ipc_receive_message(thumb_serv_sockfd, &recv_msg, sizeof(ms_thumb_server_msg));
        if (ret != MS_MEDIA_ERR_NONE) {
@@ -585,7 +585,7 @@ gboolean _ms_thumb_request_to_server(gpointer data)
        }
 
        if (g_shutdowning_thumb_server) {
-               MS_DBG_ERR("Thumb server is shutting down... wait for complete");
+               MS_DBG_WARN("Thumb server is shutting down... wait for complete");
                usleep(10000);
                return TRUE;
        }