[sr-dev] git:master: db_oracle(k): 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: d0ede402a4e5a9163405fa3da66b2cb38ab24552
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d0ede402a4e5a9163405fa3da66b2cb38ab24552
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: Tue Nov 1 20:30:15 2011 +0100
db_oracle(k): init DB API lib in mod_register()
---
modules_k/db_oracle/db_oracle.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/modules_k/db_oracle/db_oracle.c b/modules_k/db_oracle/db_oracle.c
index f72d043..9a6df8e 100644
--- a/modules_k/db_oracle/db_oracle.c
+++ b/modules_k/db_oracle/db_oracle.c
@@ -76,6 +76,13 @@ struct module_exports exports = {
};
+int mod_register(char *path, int *dlflags, void *p1, void *p2)
+{
+ if(db_api_init()<0)
+ return -1;
+ return 0;
+}
+
static int oracle_mod_init(void)
{
sword major, minor, update, patch, port;
@@ -83,7 +90,7 @@ static int oracle_mod_init(void)
OCIClientVersion(&major, &minor, &update, &patch, &port);
LM_DBG("Oracle client version is %d.%d.%d.%d.%d\n",
major, minor, update, patch, port);
- return db_query_init();
+ return 0;
}
More information about the sr-dev
mailing list