Update function name 08/321608/2
authorMinje Ahn <minje.ahn@samsung.com>
Wed, 26 Mar 2025 00:09:35 +0000 (09:09 +0900)
committerMinje ahn <minje.ahn@samsung.com>
Wed, 26 Mar 2025 00:38:33 +0000 (00:38 +0000)
Changed a funtion name to reset_all_storage_validity from set_all_storage_validity

Change-Id: I18618f1c7321f7103ae86a1bd659263cef830390
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
src/common/include/media-common-db-svc.h
src/common/media-common-db-svc.c
src/server/media-server-device-block.c
src/server/media-server-main.c

index f5ea85af72bfcfe6010c5c27ce5758cac04ca887..5d75352916a26c8f5989da2758185e292de1acbb 100644 (file)
@@ -60,7 +60,7 @@ int ms_check_storage(sqlite3 *handle, const char *storage_id, char **storage_pat
 int ms_insert_storage(sqlite3 *handle, const char *storage_id, const char *storage_path, uid_t uid);
 int ms_update_storage(sqlite3 *handle, const char *storage_id, const char *storage_path, uid_t uid);
 int ms_set_storage_validity(const char *storage_id, int validity, uid_t uid);
-int ms_set_all_storage_validity(int validity, uid_t uid);
+int ms_reset_all_storage_validity(uid_t uid);
 int ms_check_folder_exist(sqlite3 *handle, const char *folder_path);
 int ms_get_folder_id(sqlite3 *handle, const char *storage_id, const char *path, char **folder_id);
 void ms_register_start(bool noti_status, int pid);
index 57d4bf1b8c6c6624864614fc080ad412ab945f47..c4db2b2e22cd2c265cb24109f08be0ea49af73ee 100644 (file)
@@ -48,7 +48,7 @@ typedef int (*CHECK_STORAGE)(sqlite3 *, const char *, char **, int *);
 typedef int (*INSERT_STORAGE)(sqlite3 *, const char *, const char *, uid_t);
 typedef int (*UPDATE_STORAGE)(sqlite3 *, const char *, const char *, uid_t);
 typedef int (*SET_STORAGE_VALIDITY)(const char *, int, uid_t uid);
-typedef int (*SET_ALL_STORAGE_VALIDITY)(int, uid_t);
+typedef int (*RESET_ALL_STORAGE_VALIDITY)(uid_t);
 typedef int (*CHECK_FOLDER_EXIST)(sqlite3 *, const char *);
 typedef int (*REFRESH_ITEM)(sqlite3 *, const char *, uid_t);
 
@@ -82,7 +82,7 @@ enum func_list {
        eINSERT_STORAGE,
        eUPDATE_STORAGE,
        eSET_STORAGE_VALIDITY,
-       eSET_ALL_STORAGE_VALIDITY,
+       eRESET_ALL_STORAGE_VALIDITY,
        eCHECK_FOLDER_EXIST,
        eREFRESH_ITEM,
 #ifdef _USE_TVPD_MODE
@@ -120,7 +120,7 @@ int ms_load_functions(void)
                "insert_storage",
                "update_storage",
                "set_storage_validity",
-               "set_all_storage_validity",
+               "reset_all_storage_validity",
                "check_folder_exist",
                "refresh_item",
 #ifdef _USE_TVPD_MODE
@@ -463,12 +463,12 @@ int ms_set_storage_validity(const char *storage_id, int validity, uid_t uid)
        return ret;
 }
 
-int ms_set_all_storage_validity(int validity, uid_t uid)
+int ms_reset_all_storage_validity(uid_t uid)
 {
        int ret = MS_MEDIA_ERR_NONE;
 
-       ret = ((SET_ALL_STORAGE_VALIDITY)func_array[eSET_ALL_STORAGE_VALIDITY])(validity, uid);
-       MS_DBG_RETVM_IF(ret != MS_MEDIA_ERR_NONE, ret, "SET_ALL_STORAGE_VALIDITY failed [%d]", ret);
+       ret = ((RESET_ALL_STORAGE_VALIDITY)func_array[eRESET_ALL_STORAGE_VALIDITY])(uid);
+       MS_DBG_RETVM_IF(ret != MS_MEDIA_ERR_NONE, ret, "RESET_ALL_STORAGE_VALIDITY failed [%d]", ret);
 
        return ret;
 }
index 081fedfab457c606bc648452db2848ca5fac06eb..8b7b1e458822a19b67af80befa46a4a2bca93bb5 100644 (file)
@@ -118,7 +118,7 @@ void ms_storage_remove_handler(const char *mount_path, const char *mount_uuid)
                ms_set_storage_validity(mount_uuid, 0, uid);
                ms_send_storage_scan_request(mount_path, mount_uuid, MS_SCAN_INVALID, uid);
        } else if (mount_path && g_strcmp0(mount_path, STORAGE_REMOVED) == 0) {
-               ms_set_all_storage_validity(0, uid);
+               ms_reset_all_storage_validity(uid);
        }
 }
 
index 642e5b4bfe7a1145ed9360e045be34f93f9cfc88..1b57a84cdaf22179cdb2a2518d34d602001ef686 100644 (file)
@@ -403,8 +403,8 @@ static void __ms_check_mediadb(void)
                MS_DBG_ERR("ms_set_storage_scan_status fail");
 
        /*update just valid type*/
-       if (ms_set_all_storage_validity(0, uid) != MS_MEDIA_ERR_NONE)
-               MS_DBG_ERR("ms_set_all_storage_validity fail");
+       if (ms_reset_all_storage_validity(uid) != MS_MEDIA_ERR_NONE)
+               MS_DBG_ERR("ms_reset_all_storage_validity fail");
 
 #ifdef _USE_ON_DEMAND
        ms_on_demand_reset_storage();