Просмотр исходного кода

db_cluster: use connection from write structure for db updates

- could be related to an issue reported by Øyvind Kolbu
Daniel-Constantin Mierla 13 лет назад
Родитель
Сommit
4d15ba97ba
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      modules_k/db_cluster/dbcl_api.c

+ 3 - 3
modules_k/db_cluster/dbcl_api.c

@@ -136,7 +136,7 @@
 					{\
 					{\
 						LM_DBG("serial operation - cluster [%.*s] (%d/%d)\n",\
 						LM_DBG("serial operation - cluster [%.*s] (%d/%d)\n",\
 								cls->name.len, cls->name.s, i, j);\
 								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;\
 						ret = cls->wlist[i].clist[j]->dbf.command;\
 						if (ret==0) {\
 						if (ret==0) {\
 							cls->usedcon = cls->wlist[i].clist[j];\
 							cls->usedcon = cls->wlist[i].clist[j];\
@@ -159,7 +159,7 @@
 					{\
 					{\
 						LM_DBG("round robin operation - cluster [%.*s] (%d/%d)\n",\
 						LM_DBG("round robin operation - cluster [%.*s] (%d/%d)\n",\
 								cls->name.len, cls->name.s, i, j);\
 								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;\
 						ret = cls->wlist[i].clist[j]->dbf.command;\
 						if (ret==0)\
 						if (ret==0)\
 						{\
 						{\
@@ -183,7 +183,7 @@
 					{\
 					{\
 						LM_DBG("parallel operation - cluster [%.*s] (%d/%d)\n",\
 						LM_DBG("parallel operation - cluster [%.*s] (%d/%d)\n",\
 								cls->name.len, cls->name.s, i, j);\
 								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;\
 						rc = cls->wlist[i].clist[j]->dbf.command;\
 						if(rc==0) {\
 						if(rc==0) {\
 							cls->usedcon = cls->wlist[i].clist[j];\
 							cls->usedcon = cls->wlist[i].clist[j];\