Use sqlite3_open_v2 instead of sqlite3_open 34/76934/1 accepted/tizen/common/20160629.222507 accepted/tizen/ivi/20160629.020622 accepted/tizen/mobile/20160629.020703 accepted/tizen/tv/20160629.020559 accepted/tizen/wearable/20160629.020647 submit/tizen/20160628.070541
authorHwankyu Jhun <h.jhun@samsung.com>
Tue, 28 Jun 2016 05:18:38 +0000 (14:18 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Tue, 28 Jun 2016 05:18:38 +0000 (14:18 +0900)
- Open syspopup db on readonly mode

Change-Id: Iee862f58e2285185fd9e35f8295c7204e55a9207
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/syspopup_db.c

index ea9e9f3..ff81499 100755 (executable)
@@ -38,7 +38,7 @@
 #define SP_INFO_TBL "syspopup_info"
 #define SP_INFO_TBL_F_NAME "name"
 
-static sqlite3 *db = NULL;
+static sqlite3 *db;
 
 /* db initialize */
 static int __init(void)
@@ -50,7 +50,7 @@ static int __init(void)
                return 0;
        }
 
-       rc = sqlite3_open(SYSPOPUP_DB_PATH, &db);
+       rc = sqlite3_open_v2(SYSPOPUP_DB_PATH, &db, SQLITE_OPEN_READONLY, NULL);
        if (rc != SQLITE_OK) {
                _E("Can't open database: %s / %d / %d", sqlite3_errmsg(db),
                                rc, sqlite3_extended_errcode(db));
@@ -65,7 +65,7 @@ static int __init(void)
 static int __fini(void)
 {
        if (db) {
-               sqlite3_close(db);
+               sqlite3_close_v2(db);
                db = NULL;
        }