Module: kamailio
Branch: 5.8
Commit: 86df978bc9842687035d6673ee1b71e542dcbd71
URL:
https://github.com/kamailio/kamailio/commit/86df978bc9842687035d6673ee1b71e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-03-20T13:16:19+01:00
ndb_redis: fix index on parsing sentinel address inside redisc_reconnect_server()
(cherry picked from commit c8f3b496a05ae5bf29341dc7e2630f951d4effc5)
---
Modified: src/modules/ndb_redis/redis_client.c
---
Diff:
https://github.com/kamailio/kamailio/commit/86df978bc9842687035d6673ee1b71e…
Patch:
https://github.com/kamailio/kamailio/commit/86df978bc9842687035d6673ee1b71e…
---
diff --git a/src/modules/ndb_redis/redis_client.c b/src/modules/ndb_redis/redis_client.c
index 9b755e42d6b..dbbaecbcebe 100644
--- a/src/modules/ndb_redis/redis_client.c
+++ b/src/modules/ndb_redis/redis_client.c
@@ -539,7 +539,7 @@ int redisc_reconnect_server(redisc_server_t *rsrv)
port = 6379;
if((pos = strchr(sentinelAddr, ':')) != NULL) {
port = atoi(pos + 1);
- pos[i] = '\0';
+ pos[0] = '\0';
}
redis = redisConnectWithTimeout(sentinelAddr, port, tv_conn);