diff options
author | ilho kim <ilho159.kim@samsung.com> | 2019-07-22 05:35:13 +0000 |
---|---|---|
committer | Ilho Kim <ilho159.kim@samsung.com> | 2019-07-22 14:55:19 +0900 |
commit | a836329e5fedbab27a46fd6c2dd23fb35ca3df89 (patch) | |
tree | fd09a128eace97f4ceb23d365b636a20094852b5 | |
parent | d6b644e7bcac2859ab9dff9ead24f5c24808dc21 (diff) | |
download | aul-1-a836329e5fedbab27a46fd6c2dd23fb35ca3df89.tar.gz aul-1-a836329e5fedbab27a46fd6c2dd23fb35ca3df89.tar.bz2 aul-1-a836329e5fedbab27a46fd6c2dd23fb35ca3df89.zip |
Revert "Fix pkg parser connection logic"
This reverts commit 59df121d2dfef09f2e241b919fcd703f0a9113c8.
Change-Id: Ic5d0eee3ae3b5e35db8dd677882681f9ca43016b
-rwxr-xr-x | src/service_db.c | 51 |
1 files changed, 8 insertions, 43 deletions
diff --git a/src/service_db.c b/src/service_db.c index 93c22c41..5fa39f0f 100755 --- a/src/service_db.c +++ b/src/service_db.c @@ -205,8 +205,6 @@ static int __init_app_info_db(uid_t uid, sqlite3 **app_info_db, sqlite3 **global { int rc; char *db_path; - int persist_wal = 1; - int no_checkpoint = 1; if (*app_info_db && *global_app_info_db) { _D("Already initialized"); @@ -228,26 +226,10 @@ static int __init_app_info_db(uid_t uid, sqlite3 **app_info_db, sqlite3 **global goto err; } - rc = sqlite3_file_control(*app_info_db, NULL, - SQLITE_FCNTL_PERSIST_WAL, &persist_wal); - if (rc) { - _E("failed to sqlite3_file_control: %s", - sqlite3_errmsg(*app_info_db)); - goto err; - } - - rc = sqlite3_wal_autocheckpoint(*app_info_db, 0); - if (rc) { - _E("failed to sqlite3_wal_autocheckpoint: %s", - sqlite3_errmsg(*app_info_db)); - goto err; - } - - rc = sqlite3_db_config(*app_info_db, SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE, - &no_checkpoint); - if (rc) { - _E("failed to execute sqlite3_db_config: %s", - sqlite3_errmsg(*app_info_db)); + rc = sqlite3_exec(*app_info_db, "PRAGMA journal_mode = PERSIST", + NULL, NULL, NULL); + if (SQLITE_OK != rc) { + _D("Fail to change journal mode"); goto err; } @@ -263,27 +245,10 @@ static int __init_app_info_db(uid_t uid, sqlite3 **app_info_db, sqlite3 **global goto err; } - rc = sqlite3_file_control(*global_app_info_db, NULL, - SQLITE_FCNTL_PERSIST_WAL, &persist_wal); - if (rc) { - _E("failed to sqlite3_file_control: %s", - sqlite3_errmsg(*global_app_info_db)); - goto err; - } - - rc = sqlite3_wal_autocheckpoint(*global_app_info_db, 0); - if (rc) { - _E("failed to sqlite3_wal_autocheckpoint: %s", - sqlite3_errmsg(*global_app_info_db)); - goto err; - } - - rc = sqlite3_db_config(*global_app_info_db, - SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE, - &no_checkpoint); - if (rc) { - _E("failed to execute sqlite3_db_config: %s", - sqlite3_errmsg(*global_app_info_db)); + rc = sqlite3_exec(*global_app_info_db, "PRAGMA journal_mode = PERSIST", + NULL, NULL, NULL); + if (SQLITE_OK != rc) { + _D("Fail to change journal mode"); goto err; } |