Change to row id instead of uuid for manageability.
Change-Id: I5f12e4984381788fd9245bec0028a349a9a4a4ba
Signed-off-by: minje.ahn <minje.ahn@samsung.com>
Name: media-server
Summary: A server for media content management
-Version: 0.4.25
+Version: 0.4.26
Release: 0
Group: Multimedia/Service
License: Apache-2.0
MS_DBG_RETV_IF(ret != MS_MEDIA_ERR_NONE, ret);
if (sqlite3_step(sql_stmt) == SQLITE_ROW) {
+#ifdef _USE_TVPD_MODE
*folder_id = g_strdup((const char *)sqlite3_column_text(sql_stmt, 0));
+#else
+ *folder_id = g_strdup_printf("%lld", sqlite3_column_int64(sql_stmt, 0));
+#endif
MS_DBG("folder_id [%s]", *folder_id);
} else {
*folder_id = NULL;
if (extract_data->result) {
MS_DBG_ERR("MS_MSG_SCANNER_COMPLETE");
if (extract_data->noti_type == MS_ITEM_INSERT || extract_data->noti_type == MS_ITEM_UPDATE) {
- char *folder_uuid = NULL;
- ms_get_folder_id(handle, extract_data->storage_id, extract_data->msg, &folder_uuid);
- MS_DBG_WARN("storage_id[%.*s] Path[%.*s] folder_id[%s] noti_type[%d]", MS_UUID_SIZE, extract_data->storage_id, MAX_MSG_SIZE, extract_data->msg, folder_uuid, extract_data->noti_type);
- ms_send_dir_update_noti(extract_data->msg, folder_uuid, extract_data->noti_type, extract_data->pid);
+ char *folder_id = NULL;
+ ms_get_folder_id(handle, extract_data->storage_id, extract_data->msg, &folder_id);
+ MS_DBG_WARN("storage_id[%.*s] Path[%.*s] folder_id[%s] noti_type[%d]", MS_UUID_SIZE, extract_data->storage_id, MAX_MSG_SIZE, extract_data->msg, folder_id, extract_data->noti_type);
+ ms_send_dir_update_noti(extract_data->msg, folder_id, extract_data->noti_type, extract_data->pid);
}
extract_data->msg_type = MS_MSG_EXTRACTOR_COMPLETE;
msc_send_result(ret, extract_data);
bool modified = false;
ms_dir_scan_status_e scan_status = MS_DIR_SCAN_NONE;
ms_noti_type_e noti_type = MS_ITEM_INSERT;
- char *folder_uuid = NULL;
+ char *folder_id = NULL;
bool is_recursive = true;
while (1) {
noti_type = MS_ITEM_DELETE;
scan_data->msg_type = MS_MSG_DIRECTORY_SCANNING;
- ms_get_folder_id(handle, scan_data->storage_id, scan_data->msg, &folder_uuid);
+ ms_get_folder_id(handle, scan_data->storage_id, scan_data->msg, &folder_id);
- MS_DBG_SWARN("[%.*s][%s] delete path", MAX_MSG_SIZE, scan_data->msg, folder_uuid);
+ MS_DBG_SWARN("[%.*s][%s] delete path", MAX_MSG_SIZE, scan_data->msg, folder_id);
}
if (scan_data->msg_type == MS_MSG_DIRECTORY_SCANNING) {
}
if (noti_type == MS_ITEM_DELETE)
- ms_send_dir_update_noti(scan_data->msg, folder_uuid, noti_type, scan_data->pid);
+ ms_send_dir_update_noti(scan_data->msg, folder_id, noti_type, scan_data->pid);
msc_insert_exactor_request(scan_data->msg_type, true, scan_data->storage_id, scan_data->msg, scan_data->pid, scan_data->uid, noti_type);
}
g_free(scan_data);
scan_data = NULL;
- g_free(folder_uuid);
- folder_uuid = NULL;
+ g_free(folder_id);
+ folder_id = NULL;
g_directory_scan_processing2 = DIR_SCAN_NON_SCAN;
__msc_del_cur_scan_item();
g_mutex_unlock(&scan_req_mutex2);
MS_DBG_WARN("scan_req_mutex2 is UNLOCKED");
}
-
{
int ret = MS_MEDIA_ERR_NONE;
char *start_path = NULL;
- char *folder_uuid = NULL;
+ char *folder_id = NULL;
MS_DBG_RETVM_IF(!handle, MS_MEDIA_ERR_INVALID_PARAMETER, "handle is NULL");
MS_DBG_RETVM_IF(!scan_data, MS_MEDIA_ERR_INVALID_PARAMETER, "scan_data is NULL");
if (ret != MS_MEDIA_ERR_SCANNER_FORCE_STOP) {
MS_DBG_INFO("working normally");
- ret = ms_get_folder_id(handle, scan_data->storage_id, scan_data->msg, &folder_uuid);
+ ret = ms_get_folder_id(handle, scan_data->storage_id, scan_data->msg, &folder_id);
MS_DBG_RETVM_IF(ret != MS_MEDIA_ERR_NONE, ret, "ms_get_folder_id failed");
- ret = ms_send_dir_update_noti(scan_data->msg, folder_uuid, MS_ITEM_INSERT, scan_data->pid);
+ ret = ms_send_dir_update_noti(scan_data->msg, folder_id, MS_ITEM_INSERT, scan_data->pid);
- MS_SAFE_FREE(folder_uuid);
+ MS_SAFE_FREE(folder_id);
}
return ret;
{
int ret = MS_MEDIA_ERR_NONE;
char *start_path = NULL;
- char *folder_uuid = NULL;
+ char *folder_id = NULL;
MS_DBG_RETVM_IF(!handle, MS_MEDIA_ERR_INVALID_PARAMETER, "handle is NULL");
MS_DBG_RETVM_IF(!scan_data, MS_MEDIA_ERR_INVALID_PARAMETER, "scan_data is NULL");
start_path = g_strdup(scan_data->msg);
- ret = ms_get_folder_id(handle, scan_data->storage_id, scan_data->msg, &folder_uuid);
+ ret = ms_get_folder_id(handle, scan_data->storage_id, scan_data->msg, &folder_id);
if (ret != MS_MEDIA_ERR_NONE) {
MS_DBG_ERR("ms_get_folder_id failed");
g_free(start_path);
if (ret != MS_MEDIA_ERR_SCANNER_FORCE_STOP) {
MS_DBG_INFO("working normally");
- ret = ms_send_dir_update_noti(scan_data->msg, folder_uuid, noti_type, scan_data->pid);
+ ret = ms_send_dir_update_noti(scan_data->msg, folder_id, noti_type, scan_data->pid);
}
- g_free(folder_uuid);
+ g_free(folder_id);
return ret;
}