Add db busy handler
[platform/core/appfw/pkgmgr-info.git] / src / pkgmgrinfo_appinfo.c
index 92c8647..6d9bc49 100644 (file)
@@ -569,7 +569,7 @@ static int _appinfo_get_applications(uid_t db_uid, uid_t uid,
        if (dbpath == NULL)
                return PMINFO_R_ERROR;
 
-       ret = sqlite3_open_v2(dbpath, &db, SQLITE_OPEN_READONLY, NULL);
+       ret = __open_db(dbpath, &db, SQLITE_OPEN_READONLY);
        if (ret != SQLITE_OK) {
                _LOGE("failed to open db: %d", ret);
                free(dbpath);
@@ -1625,7 +1625,7 @@ static char *_get_localed_label(const char *appid, const char *locale, uid_t uid
                goto err;
        }
 
-       if (sqlite3_open_v2(parser_db, &db, SQLITE_OPEN_READONLY, NULL) != SQLITE_OK) {
+       if (__open_db(parser_db, &db, SQLITE_OPEN_READONLY) != SQLITE_OK) {
                _LOGE("DB open fail\n");
                free(parser_db);
                goto err;