Fixed a problem that can't create DB.
authorsaerome.kim <saerome.kim@samsung.com>
Mon, 30 Sep 2019 12:24:31 +0000 (21:24 +0900)
committersaerome.kim <saerome.kim@samsung.com>
Mon, 30 Sep 2019 12:42:23 +0000 (21:42 +0900)
If there is no DB file or the size is 0, the DB file is not created.

Change-Id: If967a1ae63f1d0d61a344ff805663e1be647bbe0
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
packaging/ua-manager.spec
ua-daemon/src/ua-manager-db.c

index eaa0d49..b8b3427 100644 (file)
@@ -1,6 +1,6 @@
 Name:       ua-manager
 Summary:    User awareness manager
-Version:    0.10.5
+Version:    0.10.6
 Release:    1
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
index 4bb9e6a..ab5ddf1 100644 (file)
@@ -405,18 +405,17 @@ static int __uam_db_verify()
 {
        FUNC_ENTRY;
 
-       /* check db size */
-       retv_if(0 == _uam_get_file_size(DATABASE_FULL_PATH), UAM_ERROR_DB_FAILED);
-
        /* check table existance*/
        retv_if(UAM_ERROR_NONE != __uam_db_check_table_creation(), UAM_ERROR_DB_FAILED);
-
+       /* check db size */
+       _uam_get_file_size(DATABASE_FULL_PATH);
        /* check db integrity */
        retv_if(UAM_ERROR_NONE != __uam_db_check_integrity(), UAM_ERROR_DB_FAILED);
-
        /* set locking mode */
        retv_if(UAM_ERROR_NONE != __uam_db_set_locking_mode(), UAM_ERROR_DB_FAILED);
+
        UAM_DBG("Successfully verified database");
+
        return UAM_ERROR_NONE;
 }