浏览代码

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

- reported by Jan Hazenberg
Daniel-Constantin Mierla 10 年之前
父节点
当前提交
8375f37cd7
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      modules/db_cluster/dbcl_api.c

+ 3 - 3
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;\
 						}\