Module: kamailio
Branch: 5.5
Commit: bbb40895bc74810b37df2760bee309025fca27af
URL:
https://github.com/kamailio/kamailio/commit/bbb40895bc74810b37df2760bee3090…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-03-30T12:54:26+02:00
ndb_redis: fix index on parsing sentinel address
(cherry picked from commit 5c8eed0ce78d029f28a1819262516940b7dd749e)
(cherry picked from commit d4ff1550a7c7f9647236f03559dc2fc3106a2b8d)
---
Modified: src/modules/ndb_redis/redis_client.c
---
Diff:
https://github.com/kamailio/kamailio/commit/bbb40895bc74810b37df2760bee3090…
Patch:
https://github.com/kamailio/kamailio/commit/bbb40895bc74810b37df2760bee3090…
---
diff --git a/src/modules/ndb_redis/redis_client.c b/src/modules/ndb_redis/redis_client.c
index fd6e124bdc..50efb1906e 100644
--- a/src/modules/ndb_redis/redis_client.c
+++ b/src/modules/ndb_redis/redis_client.c
@@ -160,7 +160,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);