Module: sip-router Branch: master Commit: bfc2215d71734b09a1d7acd4dbdbe919b234c30f URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=bfc2215d...
Author: Juha Heinanen jh@tutpro.com Committer: Juha Heinanen jh@tutpro.com Date: Wed Oct 30 20:49:26 2013 +0200
Revert "modules/mtree: when loading data from db, load each tree separately"
This reverts commit 6fc84c2cf610791939ba73e38b8b5b3c0b5cd047.
---
modules/mtree/mtree_mod.c | 13 +------------ 1 files changed, 1 insertions(+), 12 deletions(-)
diff --git a/modules/mtree/mtree_mod.c b/modules/mtree/mtree_mod.c index eeec89c..0f4348c 100644 --- a/modules/mtree/mtree_mod.c +++ b/modules/mtree/mtree_mod.c @@ -291,9 +291,6 @@ static int mod_init(void)
while(pt!=NULL) { - LM_DBG("loading from tree <%.*s>\n", - pt->tname.len, pt->tname.s); - /* loading all information from database */ if(mt_load_db(&pt->tname)!=0) { @@ -494,9 +491,6 @@ error: static int mt_load_db(str *tname) { db_key_t db_cols[3] = {&tprefix_column, &tvalue_column}; - db_key_t key_cols[1]; - db_op_t op[1] = {OP_EQ}; - db_val_t vals[1]; str tprefix, tvalue; db1_res_t* db_res = NULL; int i, ret; @@ -504,11 +498,6 @@ static int mt_load_db(str *tname) m_tree_t *old_tree = NULL; mt_node_t *bk_head = NULL;
- key_cols[0] = &tname_column; - VAL_TYPE(vals) = DB1_STRING; - VAL_NULL(vals) = 0; - VAL_STRING(vals) = tname->s; - if(db_con==NULL) { LM_ERR("no db connection\n"); @@ -532,7 +521,7 @@ static int mt_load_db(str *tname) }
if (DB_CAPABILITY(mt_dbf, DB_CAP_FETCH)) { - if(mt_dbf.query(db_con, key_cols, op, vals, db_cols, 1, 2, 0, 0) < 0) + if(mt_dbf.query(db_con, 0, 0, 0, db_cols, 0, 2, 0, 0) < 0) { LM_ERR("Error while querying db\n"); return -1;