Module: kamailio
Branch: 5.6
Commit: d4ff1550a7c7f9647236f03559dc2fc3106a2b8d
URL:
https://github.com/kamailio/kamailio/commit/d4ff1550a7c7f9647236f03559dc2fc…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-03-30T12:53:27+02:00
ndb_redis: fix index on parsing sentinel address
(cherry picked from commit 5c8eed0ce78d029f28a1819262516940b7dd749e)
---
Modified: src/modules/ndb_redis/redis_client.c
---
Diff:
https://github.com/kamailio/kamailio/commit/d4ff1550a7c7f9647236f03559dc2fc…
Patch:
https://github.com/kamailio/kamailio/commit/d4ff1550a7c7f9647236f03559dc2fc…
---
diff --git a/src/modules/ndb_redis/redis_client.c b/src/modules/ndb_redis/redis_client.c
index 88a1347775..5c5ad3343a 100644
--- a/src/modules/ndb_redis/redis_client.c
+++ b/src/modules/ndb_redis/redis_client.c
@@ -162,7 +162,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);