Module: kamailio
Branch: master
Commit: c8f3b496a05ae5bf29341dc7e2630f951d4effc5
URL:
https://github.com/kamailio/kamailio/commit/c8f3b496a05ae5bf29341dc7e2630f9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-03-19T14:29:11+01:00
ndb_redis: fix index on parsing sentinel address inside redisc_reconnect_server()
---
Modified: src/modules/ndb_redis/redis_client.c
---
Diff:
https://github.com/kamailio/kamailio/commit/c8f3b496a05ae5bf29341dc7e2630f9…
Patch:
https://github.com/kamailio/kamailio/commit/c8f3b496a05ae5bf29341dc7e2630f9…
---
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);