[sr-dev] git:master:8375f37c: db_cluster: fix checking the capabilities for write operation with different priorities

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


Module: kamailio
Branch: master
Commit: 8375f37cd7603216a2bb55a4e9985b3c5e54af91
URL: https://github.com/kamailio/kamailio/commit/8375f37cd7603216a2bb55a4e9985b3c5e54af91

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

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

- reported by Jan Hazenberg

---

Modified: modules/db_cluster/dbcl_api.c

---

Diff:  https://github.com/kamailio/kamailio/commit/8375f37cd7603216a2bb55a4e9985b3c5e54af91.diff
Patch: https://github.com/kamailio/kamailio/commit/8375f37cd7603216a2bb55a4e9985b3c5e54af91.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