[sr-dev] git:4.2:4ae4e5f3: db_cluster: fix checking the capabilities for write operation with different priorities

Daniel-Constantin Mierla miconda at gmail.com
Tue Mar 10 13:56:35 CET 2015


Module: kamailio
Branch: 4.2
Commit: 4ae4e5f381fba4cf43d8792e56d2baa4b2edcc6f
URL: https://github.com/kamailio/kamailio/commit/4ae4e5f381fba4cf43d8792e56d2baa4b2edcc6f

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-03-10T13:56:02+01:00

db_cluster: fix checking the capabilities for write operation with different priorities

- reported by Jan Hazenberg

(cherry picked from commit 8375f37cd7603216a2bb55a4e9985b3c5e54af91)

---

Modified: modules/db_cluster/dbcl_api.c

---

Diff:  https://github.com/kamailio/kamailio/commit/4ae4e5f381fba4cf43d8792e56d2baa4b2edcc6f.diff
Patch: https://github.com/kamailio/kamailio/commit/4ae4e5f381fba4cf43d8792e56d2baa4b2edcc6f.patch

---

diff --git a/modules/db_cluster/dbcl_api.c b/modules/db_cluster/dbcl_api.c
index abb52d6..c338615 100644
--- a/modules/db_cluster/dbcl_api.c
+++ b/modules/db_cluster/dbcl_api.c
@@ -158,7 +158,7 @@ extern int dbcl_max_query_length;
 								cls->name.len, cls->name.s, i, j);\
 						sec = get_ticks();\
 						dbh = cls->wlist[i].clist[j]->dbh;\
-						if(cls->rlist[i].clist[j]->dbf.qfunc==NULL) {\
+						if(cls->wlist[i].clist[j]->dbf.qfunc==NULL) {\
 							LM_ERR("unsupported command by db connector\n");\
 							return -1;\
 						}\
@@ -189,7 +189,7 @@ extern int dbcl_max_query_length;
 								cls->name.len, cls->name.s, i, j);\
 						sec = get_ticks();\
 						dbh = cls->wlist[i].clist[j]->dbh;\
-						if(cls->rlist[i].clist[j]->dbf.qfunc==NULL) {\
+						if(cls->wlist[i].clist[j]->dbf.qfunc==NULL) {\
 							LM_ERR("unsupported command by db connector\n");\
 							return -1;\
 						}\
@@ -221,7 +221,7 @@ extern int dbcl_max_query_length;
 								cls->name.len, cls->name.s, i, j);\
 						sec = get_ticks();\
 						dbh = cls->wlist[i].clist[j]->dbh;\
-						if(cls->rlist[i].clist[j]->dbf.qfunc==NULL) {\
+						if(cls->wlist[i].clist[j]->dbf.qfunc==NULL) {\
 							LM_ERR("unsupported command by db connector\n");\
 							return -1;\
 						}\




More information about the sr-dev mailing list