[sr-dev] git:master: db_sqlite: init DB API lib in mod_register()
Daniel-Constantin Mierla
miconda at gmail.com
Tue Nov 1 20:33:58 CET 2011
Module: sip-router
Branch: master
Commit: 4040fead1833abddee710d18e7c655ca53cfb0ed
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4040fead1833abddee710d18e7c655ca53cfb0ed
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: Tue Nov 1 20:26:37 2011 +0100
db_sqlite: init DB API lib in mod_register()
---
modules_k/db_sqlite/db_sqlite.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/modules_k/db_sqlite/db_sqlite.c b/modules_k/db_sqlite/db_sqlite.c
index 520cc38..54b2fe8 100644
--- a/modules_k/db_sqlite/db_sqlite.c
+++ b/modules_k/db_sqlite/db_sqlite.c
@@ -57,6 +57,13 @@ static cmd_export_t cmds[] = {
{0, 0, 0, 0, 0, 0}
};
+int mod_register(char *path, int *dlflags, void *p1, void *p2)
+{
+ if(db_api_init()<0)
+ return -1;
+ return 0;
+}
+
static int sqlite_mod_init(void)
{
sqlite3_initialize();
@@ -64,7 +71,7 @@ static int sqlite_mod_init(void)
LM_INFO("SQlite library version %s (compiled using %s)\n",
sqlite3_libversion(),
SQLITE_VERSION);
- return db_query_init();
+ return 0;
}
More information about the sr-dev
mailing list