[sr-dev] git:master: db_berkeley: init DB API lib in mod_register()
Daniel-Constantin Mierla
miconda at gmail.com
Tue Nov 1 20:33:57 CET 2011
Module: sip-router
Branch: master
Commit: 41225392808b1e5462be40e37ba85700e8eab632
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=41225392808b1e5462be40e37ba85700e8eab632
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: Tue Nov 1 20:22:30 2011 +0100
db_berkeley: init DB API lib in mod_register()
---
modules/db_berkeley/bdb_mod.c | 7 +++++++
modules/db_berkeley/km_db_berkeley.c | 2 +-
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/modules/db_berkeley/bdb_mod.c b/modules/db_berkeley/bdb_mod.c
index 1adf86d..81bac08 100644
--- a/modules/db_berkeley/bdb_mod.c
+++ b/modules/db_berkeley/bdb_mod.c
@@ -108,6 +108,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 bdb_mod_init(void)
{
bdb_params_t p;
diff --git a/modules/db_berkeley/km_db_berkeley.c b/modules/db_berkeley/km_db_berkeley.c
index d350d8e..61af129 100644
--- a/modules/db_berkeley/km_db_berkeley.c
+++ b/modules/db_berkeley/km_db_berkeley.c
@@ -129,7 +129,7 @@ int km_mod_init(void)
if(km_bdblib_init(&p))
return -1;
- return db_query_init();
+ return 0;
}
void km_destroy(void)
More information about the sr-dev
mailing list