goto STOP_SCAN;
}
- ms_bacth_commit_disable(TRUE, TRUE, uid);
- ms_bacth_commit_enable(TRUE, TRUE, FALSE, pid);
+ ms_batch_commit_disable(TRUE, TRUE, uid);
+ ms_batch_commit_enable(TRUE, TRUE, FALSE, pid);
/* get the current path from directory array */
current_path = g_array_index(dir_array , char*, 0);
g_array_remove_index(dir_array, 0);
__msc_clear_file_list(dir_array);
- ms_bacth_commit_disable(TRUE, TRUE, uid);
+ ms_batch_commit_disable(TRUE, TRUE, uid);
if (ret != MS_MEDIA_ERR_NONE) MS_DBG_INFO("ret : %d", ret);
scan_function = (scan_type == MS_MSG_STORAGE_ALL) ? ms_scan_item_batch : ms_scan_validate_item;
- ms_bacth_commit_disable(TRUE, TRUE, uid);
+ ms_batch_commit_disable(TRUE, TRUE, uid);
/*start db update. the number of element in the array , db update is complete.*/
while (dir_array->len != 0) {
/*check poweroff status*/
if (ret != MS_MEDIA_ERR_NONE)
goto STOP_SCAN;
- /*ms_bacth_commit_disable(handle, TRUE, TRUE, uid);*/
- ms_bacth_commit_enable(TRUE, TRUE, FALSE, pid);
+ /*ms_batch_commit_disable(handle, TRUE, TRUE, uid);*/
+ ms_batch_commit_enable(TRUE, TRUE, FALSE, pid);
/* get the current path from directory array */
current_path = g_array_index(dir_array , char*, 0);
ms_insert_folder_end(uid);
/*commit to db before set scan done, fix timing issue storage scan, then folder scan for same folder*/
- ms_bacth_commit_disable(TRUE, TRUE, uid);
+ ms_batch_commit_disable(TRUE, TRUE, uid);
ms_set_folder_scan_status(handle, storage_id, current_path, MS_DIR_SCAN_DONE, uid);
if (fd != -1) {
__msc_set_storage_scan_cur_path(NULL);
__msc_clear_file_list(dir_array);
- ms_bacth_commit_disable(TRUE, TRUE, uid);
+ ms_batch_commit_disable(TRUE, TRUE, uid);
if (ret != MS_MEDIA_ERR_NONE) MS_DBG_INFO("ret : %d", ret);
MS_DBG_ERR("error : %d", err);
/*call for bundle commit*/
- ms_bacth_commit_enable(TRUE, TRUE, FALSE, 0);
+ ms_batch_commit_enable(TRUE, TRUE, FALSE, 0);
if (strcmp(scan_data->msg, MEDIA_ROOT_PATH_DISC) == 0) {
MS_DBG("[DATA DISC]");
ret = __msc_db_update(handle, storage_id, scan_data);
/*call for bundle commit*/
- ms_bacth_commit_disable(TRUE, TRUE, uid);
+ ms_batch_commit_disable(TRUE, TRUE, uid);
MS_DBG_WARN("folder scan done, sent cb event path = [%.*s]", MAX_MSG_SIZE, scan_data->msg);
__msc_call_dir_scan_cb();
valid_status = (scan_type == MS_MSG_STORAGE_PARTIAL || MS_MSG_STORAGE_ALL == scan_type) ? TRUE : FALSE;
if (scan_type != MS_MSG_STORAGE_INVALID)
- ms_bacth_commit_enable(TRUE, valid_status, FALSE, 0);
+ ms_batch_commit_enable(TRUE, valid_status, FALSE, 0);
if (scan_type == MS_MSG_STORAGE_ALL) {
/* Delete all data before full scanning */
/*call for bundle commit*/
if (scan_type != MS_MSG_STORAGE_INVALID)
- ms_bacth_commit_disable(TRUE, valid_status, uid);
+ ms_batch_commit_disable(TRUE, valid_status, uid);
if (scan_type == MS_MSG_STORAGE_PARTIAL && ret == MS_MEDIA_ERR_NONE) {
/*delete invalid folder first, then delete invalid item, avoid to folder was deleted but item not when unmount*/
/*start db updating */
/*call for bundle commit*/
- ms_bacth_commit_enable(TRUE, FALSE, TRUE, pid);
+ ms_batch_commit_enable(TRUE, FALSE, TRUE, pid);
MS_DBG_WARN("BULK REGISTER START");
}
/*call for bundle commit*/
- ms_bacth_commit_disable(TRUE, FALSE, uid);
+ ms_batch_commit_disable(TRUE, FALSE, uid);
/*disconnect form media db*/
if (handle) ms_disconnect_db(handle);
}
start_path = g_strdup(scan_data->msg);
- ms_bacth_commit_enable(TRUE, TRUE, FALSE, 0);
+ ms_batch_commit_enable(TRUE, TRUE, FALSE, 0);
if (noti_type == MS_ITEM_INSERT)
ret = __msc_dir_scan(handle, storage_id, start_path, false, is_recursive, scan_data->uid);
else
ret = __msc_dir_scan(handle, storage_id, start_path, true, is_recursive, scan_data->uid);
- ms_bacth_commit_disable(TRUE, TRUE, scan_data->uid);
+ ms_batch_commit_disable(TRUE, TRUE, scan_data->uid);
if (!ms_delete_invalid_items(handle, storage_id, scan_data->uid))
MS_DBG_ERR("deleting invalid items in storage failed");
ms_set_db_status(MS_DB_UPDATING, storage_type);
valid_status = (scan_type == MS_MSG_STORAGE_PARTIAL) ? TRUE : FALSE;
- ms_bacth_commit_enable(TRUE, valid_status, FALSE, 0);
+ ms_batch_commit_enable(TRUE, valid_status, FALSE, 0);
if (scan_type == MS_MSG_STORAGE_PARTIAL) {
ret = ms_validity_change_all_items(handle, storage_id, false, scan_data->uid);
ret = __msc_db_update(handle, storage_id, scan_data);
/*call for bundle commit*/
- ms_bacth_commit_disable(TRUE, valid_status, scan_data->uid);
+ ms_batch_commit_disable(TRUE, valid_status, scan_data->uid);
if (scan_type == MS_MSG_STORAGE_PARTIAL && ret == MS_MEDIA_ERR_NONE) {
if (!ms_delete_invalid_items(handle, storage_id, scan_data->uid))
/*start db updating */
/*call for bundle commit*/
- ms_bacth_commit_enable(TRUE, FALSE, TRUE, pid);
+ ms_batch_commit_enable(TRUE, FALSE, TRUE, pid);
MS_DBG_WARN("BULK REGISTER START[%d]", pid);
}
/*call for bundle commit*/
- ms_bacth_commit_disable(TRUE, FALSE, uid);
+ ms_batch_commit_disable(TRUE, FALSE, uid);
/*disconnect form media db*/
if (handle) ms_disconnect_db(handle);