Module: sip-router Branch: master Commit: 4d15ba97bab58108cfedc45158d90583f67cdadf URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4d15ba97...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Fri Aug 24 09:14:28 2012 +0200
db_cluster: use connection from write structure for db updates
- could be related to an issue reported by Øyvind Kolbu
---
modules_k/db_cluster/dbcl_api.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules_k/db_cluster/dbcl_api.c b/modules_k/db_cluster/dbcl_api.c index d92a8ca..20d689c 100644 --- a/modules_k/db_cluster/dbcl_api.c +++ b/modules_k/db_cluster/dbcl_api.c @@ -136,7 +136,7 @@ {\ LM_DBG("serial operation - cluster [%.*s] (%d/%d)\n",\ cls->name.len, cls->name.s, i, j);\ - dbh = cls->rlist[i].clist[j]->dbh;\ + dbh = cls->wlist[i].clist[j]->dbh;\ ret = cls->wlist[i].clist[j]->dbf.command;\ if (ret==0) {\ cls->usedcon = cls->wlist[i].clist[j];\ @@ -159,7 +159,7 @@ {\ LM_DBG("round robin operation - cluster [%.*s] (%d/%d)\n",\ cls->name.len, cls->name.s, i, j);\ - dbh = cls->rlist[i].clist[j]->dbh;\ + dbh = cls->wlist[i].clist[j]->dbh;\ ret = cls->wlist[i].clist[j]->dbf.command;\ if (ret==0)\ {\ @@ -183,7 +183,7 @@ {\ LM_DBG("parallel operation - cluster [%.*s] (%d/%d)\n",\ cls->name.len, cls->name.s, i, j);\ - dbh = cls->rlist[i].clist[j]->dbh;\ + dbh = cls->wlist[i].clist[j]->dbh;\ rc = cls->wlist[i].clist[j]->dbf.command;\ if(rc==0) {\ cls->usedcon = cls->wlist[i].clist[j];\