[sr-dev] git:master: db_cluster: fix caseness in testing the connection flags for reading

Daniel-Constantin Mierla miconda at gmail.com
Tue Jan 28 18:32:34 CET 2014


Module: sip-router
Branch: master
Commit: 88a1a1b25b5228ef2e34ee01e0dd5d4e4f6ffe20
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=88a1a1b25b5228ef2e34ee01e0dd5d4e4f6ffe20

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Tue Jan 28 18:30:30 2014 +0100

db_cluster: fix caseness in testing the connection flags for reading

- on a report generated by cppcheck sent by David Binderman

---

 modules/db_cluster/dbcl_data.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/db_cluster/dbcl_data.c b/modules/db_cluster/dbcl_data.c
index 5ef3b63..ca821bc 100644
--- a/modules/db_cluster/dbcl_data.c
+++ b/modules/db_cluster/dbcl_data.c
@@ -249,7 +249,7 @@ int dbcl_cls_set_connections(dbcl_cls_t *cls, str *cons)
 			goto error;
 		}
 		i = s.s[0] - '0';
-		if(s.s[1]!='s' && s.s[1]!='S' && s.s[1]!='r' && s.s[1]!='r')
+		if(s.s[1]!='s' && s.s[1]!='S' && s.s[1]!='r' && s.s[1]!='R')
 		{
 			LM_ERR("invalid parameter [%.*s] for connection id [%.*s]\n",
 					pit->body.len, pit->body.s,
@@ -277,7 +277,7 @@ int dbcl_cls_set_connections(dbcl_cls_t *cls, str *cons)
 			goto error;
 		}
 		i = s.s[2] - '0';
-		if(s.s[3]!='s' && s.s[3]!='S' && s.s[3]!='r' && s.s[3]!='r'
+		if(s.s[3]!='s' && s.s[3]!='S' && s.s[3]!='r' && s.s[3]!='R'
 				 && s.s[3]!='p' && s.s[3]!='P')
 		{
 			LM_ERR("invalid parameter [%.*s] for connection id [%.*s]\n",




More information about the sr-dev mailing list