Module: kamailio
Branch: master
Commit: 5c8eed0ce78d029f28a1819262516940b7dd749e
URL:
https://github.com/kamailio/kamailio/commit/5c8eed0ce78d029f28a181926251694…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-03-30T12:49:27+02:00
ndb_redis: fix index on parsing sentinel address
---
Modified: src/modules/ndb_redis/redis_client.c
---
Diff:
https://github.com/kamailio/kamailio/commit/5c8eed0ce78d029f28a181926251694…
Patch:
https://github.com/kamailio/kamailio/commit/5c8eed0ce78d029f28a181926251694…
---
diff --git a/src/modules/ndb_redis/redis_client.c b/src/modules/ndb_redis/redis_client.c
index a3ee1c332d..08f6ad8fc6 100644
--- a/src/modules/ndb_redis/redis_client.c
+++ b/src/modules/ndb_redis/redis_client.c
@@ -163,7 +163,7 @@ int redisc_init(void)
port = 6379;
if( (pos = strchr(sentinelAddr, ':')) != NULL ) {
port = atoi(pos+1);
- pos[i] = '\0';
+ pos[0] = '\0';
}
redis = redisConnectWithTimeout(sentinelAddr, port, tv_conn);