Module: kamailio
Branch: 5.7
Commit: 4cc28e453d8e62b9f6e2725b9496600c662a8811
URL:
https://github.com/kamailio/kamailio/commit/4cc28e453d8e62b9f6e2725b9496600…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-03-20T13:27:08+01:00
ndb_redis: fix index on parsing sentinel address inside redisc_reconnect_server()
(cherry picked from commit c8f3b496a05ae5bf29341dc7e2630f951d4effc5)
(cherry picked from commit 86df978bc9842687035d6673ee1b71e542dcbd71)
---
Modified: src/modules/ndb_redis/redis_client.c
---
Diff:
https://github.com/kamailio/kamailio/commit/4cc28e453d8e62b9f6e2725b9496600…
Patch:
https://github.com/kamailio/kamailio/commit/4cc28e453d8e62b9f6e2725b9496600…
---
diff --git a/src/modules/ndb_redis/redis_client.c b/src/modules/ndb_redis/redis_client.c
index a0865dc6125..e85fdcec7aa 100644
--- a/src/modules/ndb_redis/redis_client.c
+++ b/src/modules/ndb_redis/redis_client.c
@@ -491,7 +491,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);