Remove size check to avoid call 'mc_db_util_remove_db' 06/290906/2
authorjiyong.min <jiyong.min@samsung.com>
Tue, 4 Apr 2023 23:41:26 +0000 (08:41 +0900)
committerJiyong Min <jiyong.min@samsung.com>
Thu, 6 Apr 2023 00:51:39 +0000 (00:51 +0000)
The mediacontroller resets all tables except the latest server.
If not exists, it will be created.
Therefore, there is no problem when the size is 0.
It is unnecessary behavior.

Change-Id: Icd91f352715cbed9c8499fce4cb5373762162845
(cherry picked from commit 8b01b12c6781ca02148e920137e61b3cf0e8ff5f)

packaging/capi-media-controller.spec
svc/media_controller_svc.c

index df530987b90e01aa88e4c29b01324949e58b81a1..33fc9f5f73ca83496689767380d0a7b69494cbd9 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-controller
 Summary:    A media controller library in Tizen Native API
-Version:    0.2.34
+Version:    0.2.35
 Release:    1
 Group:      Multimedia/API
 License:    Apache-2.0
index 4fe9ccac7e7f436d00e1a7b2c3c4cc9138a16c31..7570f65df3feb003528009dc3565efe2b2ee0175 100644 (file)
@@ -199,9 +199,9 @@ static int __mc_service_check_db(uid_t uid)
        /* Check the size of database */
        if (stat(db_path, &buf) == 0) {
                if (buf.st_size == 0) {
-                       mc_warning("The size of database is error");
+                       mc_warning("The size of database is 0, it's ok");
                        g_free(db_path);
-                       return MEDIA_CONTROLLER_ERROR_INVALID_OPERATION;
+                       return MEDIA_CONTROLLER_ERROR_NONE;
                }
        } else {
                mc_stderror("stat failed");