Module: kamailio
Branch: master
Commit: 744be5a9315687bf632d35d68cdfc6d913368477
URL:
https://github.com/kamailio/kamailio/commit/744be5a9315687bf632d35d68cdfc6d…
Author: grumvalski <federico.cabiddu(a)gmail.com>
Committer: grumvalski <federico.cabiddu(a)gmail.com>
Date: 2018-02-16T11:26:00+01:00
ndb_redis: fix check on server name len when adding a new server to the cluster
---
Modified: src/modules/ndb_redis/redis_client.c
---
Diff:
https://github.com/kamailio/kamailio/commit/744be5a9315687bf632d35d68cdfc6d…
Patch:
https://github.com/kamailio/kamailio/commit/744be5a9315687bf632d35d68cdfc6d…
---
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;
}