aboutsummaryrefslogtreecommitdiff
path: root/ext/ota/sqlite3ota.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/ota/sqlite3ota.c')
-rw-r--r--ext/ota/sqlite3ota.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/ota/sqlite3ota.c b/ext/ota/sqlite3ota.c
index d2f8d99ec..369f035e4 100644
--- a/ext/ota/sqlite3ota.c
+++ b/ext/ota/sqlite3ota.c
@@ -2648,8 +2648,12 @@ sqlite3ota *sqlite3ota_open(const char *zTarget, const char *zOta){
/*
** Return the database handle used by pOta.
*/
-sqlite3 *sqlite3ota_db(sqlite3ota *pOta){
- return (pOta ? pOta->dbMain : 0);
+sqlite3 *sqlite3ota_db(sqlite3ota *pOta, int bOta){
+ sqlite3 *db = 0;
+ if( pOta ){
+ db = (bOta ? pOta->dbOta : pOta->dbMain);
+ }
+ return db;
}