}
return MS_MEDIA_ERR_INTERNAL;
}
- MSAPI_DBG_ERR("success send notification");
+ MSAPI_DBG_INFO("success send notification");
g_object_unref(bus);
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;
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
}
}
- 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++) {
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);
}
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;
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;
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
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 {
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);
}
}
}
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 {
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);
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;
}
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) {
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;
}
}
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;
}
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
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
#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;
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;
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;
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);
}
}
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");
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)) {
}
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);
}
}
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;
}
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;
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;
}
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;
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);
/*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");
}
}
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
/*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);
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);
/* 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 */
MS_SAFE_FREE(extract_data);
- MS_DBG_ERR("STORAGE EXTRACT END[%d]", ret);
+ MS_DBG_WARN("STORAGE EXTRACT END[%d]", ret);
} /*thread while*/
_POWEROFF:
} 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));
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;
}
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...");
}
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;
}
/* 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) {
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;
/* 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);
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);
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*));
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.*/
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*));
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;
__msc_pause_scan();
- MS_DBG_ERR("wait folder scan callback");
+ MS_DBG_WARN("wait folder scan callback");
__msc_remove_dir_scan_cb();
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();
}
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);
/*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);
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);
}
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;
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*/
/*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);
}
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 {
}
}
} 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);
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);
/*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");
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) {
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;
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");
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
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:
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*/
/*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++) {
/* 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);
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;
}
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...");
}
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);
}
}
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;
}
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;
}
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;
}
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);
MS_DBG_ERR("set power off status to 1 failed");
}
- MS_DBG_ERR("POWER OFF END");
+ MS_DBG_WARN("POWER OFF END");
}
#endif
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);
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*/
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*/
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;
}
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);
}
}
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)) {
}
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);
}
}
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;
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;
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);
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*/
/*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) {
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");
}
__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
/*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);
}
}
MS_SAFE_FREE(scan_data);
- MS_DBG_ERR("STORAGE SCAN END[%d]", ret);
+ MS_DBG_WARN("STORAGE SCAN END[%d]", ret);
} /*thread while*/
_POWEROFF:
/*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++) {
/* 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);
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;
}
}
/* 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;
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) {
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;
}
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;
}
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;
}
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);
\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
\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
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) {
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);
}
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);
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);
}
}
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);
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);
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;
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);
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)
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);
}
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);
}
}
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);
}
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;
}
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);
}
}
- MS_DBG_ERR("end of __ms_deal_reset_status\n");
+ MS_DBG_WARN("end of __ms_deal_reset_status\n");
return true;
}
ret = ms_load_functions();
if (ret != MS_MEDIA_ERR_NONE) {
MS_DBG_ERR("ms_load_functions failed [%d]", ret);
- return ret;
+ return;
}
/* request scanning */
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 */
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);
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);
}
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);
}
}
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.");
/*Active flush */
malloc_trim(0);
- MS_DBG_ERR("*** Media Server is running ***");
+ MS_DBG_WARN("*** Media Server is running ***");
ms_write_media_server_status();
__ms_free_global_variable();
- MS_DBG_ERR("*** Media Server is stopped ***");
+ MS_DBG_WARN("*** Media Server is stopped ***");
return 0;
}
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;
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;
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");
}
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;
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);
}
}
- MS_DBG_ERR("_ms_cleanup_scanner END");
+ MS_DBG_WARN("_ms_cleanup_scanner END");
return;
}
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;
}
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;
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;
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);
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);
}
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;
}
/* 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");
/* 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");
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) {
}
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;
}