Module: sip-router
Branch: master
Commit: cebdb3730f1411401d0fa171947034d01caef212
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=cebdb37…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Mon Apr 9 16:33:44 2012 +0200
msilo: set table before doing db query
- cope with db_cluster module, reported by Juha Heinanen
---
modules_k/msilo/msilo.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/modules_k/msilo/msilo.c b/modules_k/msilo/msilo.c
index e849fc7..12e6fe0 100644
--- a/modules_k/msilo/msilo.c
+++ b/modules_k/msilo/msilo.c
@@ -1061,6 +1061,12 @@ static int m_dump(struct sip_msg* msg, str* owner_s)
goto error;
}
+ if (msilo_dbf.use_table(db_con, &ms_db_table) < 0)
+ {
+ LM_ERR("failed to use_table\n");
+ return -1;
+ }
+
if (msilo_dbf.query(db_con,db_keys,db_ops,db_vals,db_cols,db_no_keys,
db_no_cols, ob_key, &db_res) < 0) {
LM_ERR("failed to query database\n");
@@ -1211,6 +1217,11 @@ void m_clean_silo(unsigned int ticks, void *param)
msg_list_check(ml);
mle = p = msg_list_reset(ml);
n = 0;
+ if (msilo_dbf.use_table(db_con, &ms_db_table) < 0)
+ {
+ LM_ERR("failed to use_table\n");
+ return;
+ }
while(p)
{
if(p->flag & MS_MSG_DONE)