Remove unnecessary database check 03/290903/1
authorjiyong.min <jiyong.min@samsung.com>
Tue, 4 Apr 2023 23:41:26 +0000 (08:41 +0900)
committerjiyong.min <jiyong.min@samsung.com>
Tue, 4 Apr 2023 23:48:35 +0000 (08:48 +0900)
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

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

index df53098..33fc9f5 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 4fe9cca..7570f65 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");