Module: sip-router
Branch: master
Commit: 4d15ba97bab58108cfedc45158d90583f67cdadf
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4d15ba97bab58108cfedc45158d90583f67cdadf

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
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];\


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to