Module: kamailio
Branch: master
Commit: 62b00fc883b552cc2c1270f5f50a51da753710d5
URL:
https://github.com/kamailio/kamailio/commit/62b00fc883b552cc2c1270f5f50a51d…
Author: Federico Cabiddu <federico.cabiddu(a)gmail.com>
Committer: GitHub <noreply(a)github.com>
Date: 2018-02-16T13:00:04+01:00
Merge pull request #1444 from grumvalski/redis_server_len_fix
ndb_redis: fix check on server name len when adding a new server to tâ¦
---
Modified: src/modules/ndb_redis/redis_client.c
---
Diff:
https://github.com/kamailio/kamailio/commit/62b00fc883b552cc2c1270f5f50a51d…
Patch:
https://github.com/kamailio/kamailio/commit/62b00fc883b552cc2c1270f5f50a51d…
---
diff --git a/src/modules/ndb_redis/redis_client.c b/src/modules/ndb_redis/redis_client.c
index 90d9865241..dd4ccd0a7a 100644
--- a/src/modules/ndb_redis/redis_client.c
+++ b/src/modules/ndb_redis/redis_client.c
@@ -707,7 +707,7 @@ int check_cluster_reply(redisReply *reply, redisc_server_t **rsrv)
"name=%.*s;addr=%.*s;port=%i", name.len, name.s,
addr.len, addr.s, port);
- if(server_len>0 || server_len>sizeof(spec_new) - 1) {
+ if(server_len<0 || server_len>sizeof(spec_new) - 1) {
LM_ERR("failed to print server spec string\n");
return 0;
}