projects
/
platform
/
core
/
uifw
/
capi-ui-sticker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
375c08b
)
Add code for the DB recovery
95/230995/1
author
InHong Han
<inhong1.han@samsung.com>
Thu, 16 Apr 2020 11:03:36 +0000
(20:03 +0900)
committer
InHong Han
<inhong1.han@samsung.com>
Thu, 16 Apr 2020 11:18:33 +0000
(20:18 +0900)
Change-Id: Iea229d68322b3c45affbaadea9aa556db4e9a6cc
server/stickerd_db_manager.c
patch
|
blob
|
history
diff --git
a/server/stickerd_db_manager.c
b/server/stickerd_db_manager.c
index
ad78560
..
6e3ace3
100644
(file)
--- a/
server/stickerd_db_manager.c
+++ b/
server/stickerd_db_manager.c
@@
-318,6
+318,9
@@
static sqlite3 *_db_open(void)
sqlite3 *db = NULL;
char *err = NULL;
+ if (is_corrupted && _recover_db() != SQLITE_OK)
+ return NULL;
+
ret = sqlite3_open(STICKER_DB_PATH, &db);
if (ret != SQLITE_OK) {
LOGE("Failed to open db : %s", sqlite3_errmsg(db));