Ver Fonte

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

- reported by Jan Hazenberg
Daniel-Constantin Mierla há 10 anos atrás
pai
commit
8375f37cd7
1 ficheiros alterados com 3 adições e 3 exclusões
  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;\
 						}\