Browse Source

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

- reported by Jan Hazenberg
Daniel-Constantin Mierla 10 years ago
parent
commit
8375f37cd7
1 changed files with 3 additions and 3 deletions
  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);\
 								cls->name.len, cls->name.s, i, j);\
 						sec = get_ticks();\
 						sec = get_ticks();\
 						dbh = cls->wlist[i].clist[j]->dbh;\
 						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");\
 							LM_ERR("unsupported command by db connector\n");\
 							return -1;\
 							return -1;\
 						}\
 						}\
@@ -189,7 +189,7 @@ extern int dbcl_max_query_length;
 								cls->name.len, cls->name.s, i, j);\
 								cls->name.len, cls->name.s, i, j);\
 						sec = get_ticks();\
 						sec = get_ticks();\
 						dbh = cls->wlist[i].clist[j]->dbh;\
 						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");\
 							LM_ERR("unsupported command by db connector\n");\
 							return -1;\
 							return -1;\
 						}\
 						}\
@@ -221,7 +221,7 @@ extern int dbcl_max_query_length;
 								cls->name.len, cls->name.s, i, j);\
 								cls->name.len, cls->name.s, i, j);\
 						sec = get_ticks();\
 						sec = get_ticks();\
 						dbh = cls->wlist[i].clist[j]->dbh;\
 						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");\
 							LM_ERR("unsupported command by db connector\n");\
 							return -1;\
 							return -1;\
 						}\
 						}\