Bug fix of cloud check condition 89/51889/1
authorHaejeong, Kim <backto.kim@samsung.com>
Tue, 17 Nov 2015 04:52:51 +0000 (13:52 +0900)
committerHaejeong, Kim <backto.kim@samsung.com>
Tue, 17 Nov 2015 04:52:51 +0000 (13:52 +0900)
Change-Id: Ia05d993582b883fb68e095f662f4a4fe607f075c

packaging/libmedia-service.spec
src/common/media-svc.c

index 90fb12b..60fa6f2 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       libmedia-service
 Summary:    Media information service library for multimedia applications
-Version: 0.2.61
+Version: 0.2.62
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0 and public domain
index 8cd870d..df2dba1 100755 (executable)
@@ -1882,7 +1882,7 @@ int media_svc_insert_storage(MediaSvcHandle *handle, const char *storage_id, con
        media_svc_retvm_if(db_handle == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "Handle is NULL");
        media_svc_retvm_if(storage_id == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "storage_id is NULL");
        media_svc_retvm_if(storage_path == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "storage_path is NULL");
-       media_svc_retvm_if(__media_svc_check_storage(storage_type, FALSE) != TRUE, MS_MEDIA_ERR_INVALID_PARAMETER, "Invalid storage_type");
+       media_svc_retvm_if(__media_svc_check_storage(storage_type, TRUE) != TRUE, MS_MEDIA_ERR_INVALID_PARAMETER, "Invalid storage_type");
 
        ret = _media_svc_append_storage(db_handle, storage_id, storage_name, storage_path, storage_account, storage_type, uid);
        media_svc_retvm_if(ret != MS_MEDIA_ERR_NONE, ret, "append storage failed : %d", ret);
@@ -1918,7 +1918,7 @@ int media_svc_delete_storage(MediaSvcHandle *handle, const char *storage_id, con
                media_svc_error("fail to _media_svc_delete_folder_by_storage_id. error : [%d]", ret);
        }
 
-       if (storage_type == MEDIA_SVC_STORAGE_EXTERNAL_USB) {
+       if ((storage_type == MEDIA_SVC_STORAGE_EXTERNAL_USB) || (storage_type == MEDIA_SVC_STORAGE_CLOUD)) {
                ret = _media_svc_drop_media_table(db_handle, storage_id, uid);
                media_svc_retvm_if(ret != MS_MEDIA_ERR_NONE, ret, "drop table failed : %d", ret);