char *storage_path = NULL;
void **handle = NULL;
int validity = 0;
+ bool scan = false;
uid_t uid;
ms_dir_scan_type_t scan_type = MS_SCAN_ALL;
ms_connect_db(&handle, uid);
if (mount_path != NULL && mount_uuid != NULL) {
+ /*CHECK DB HERE */
+ ret = ms_check_db_upgrade(handle, &scan, uid);
+ if (ret != MS_MEDIA_ERR_NONE) {
+ MS_DBG_ERR("ms_check_db_upgrade failed");
+ goto ERROR;
+ }
+
/* update storage information into media DB */
ret = ms_check_storage(handle, mount_uuid, NULL, &storage_path, &validity);
if (ret == 0) {
} else {
/* there is no information of this storage in Media DB */
ret = ms_insert_storage(handle, mount_uuid, NULL, mount_path, uid);
+ if (ret != MS_MEDIA_ERR_NONE) {
+ MS_DBG_ERR("ms_insert_storage failed");
+ goto ERROR;
+ }
}
/* request to update media db */
bool info_exist = FALSE;
char *cid = NULL;
uid_t uid;
+ bool scan = false;
void **db_handle = NULL;
ms_present_mmc_status(MS_SDCARD_INSERTED);
ms_get_mmc_id(&cid);
+ /* CHECK DB HERE!! */
+ ret = ms_check_db_upgrade(db_handle, &scan, uid);
+ if (ret != MS_MEDIA_ERR_NONE) {
+ MS_DBG_ERR("ms_check_db_upgrade failed [%d]", ret);
+ ms_disconnect_db(&db_handle);
+ ms_unload_functions();
+ return MS_MEDIA_ERR_INTERNAL;
+ }
+
__ms_get_mmc_info(db_handle, &storage_name, &storage_path, &validity, &info_exist);
if (info_exist == TRUE) {