Module: kamailio
Branch: 5.4
Commit: 2b290d383d186efc1afe385f669c42bf64ba67ec
URL:
https://github.com/kamailio/kamailio/commit/2b290d383d186efc1afe385f669c42b…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2021-03-02T15:28:07+01:00
ndb_redis: fix cluster support
fixes #2461 related #2300
(cherry picked from commit 5557b9b715a9ca754c454b5edaebf2a43b832015)
---
Modified: src/modules/ndb_redis/redis_client.c
---
Diff:
https://github.com/kamailio/kamailio/commit/2b290d383d186efc1afe385f669c42b…
Patch:
https://github.com/kamailio/kamailio/commit/2b290d383d186efc1afe385f669c42b…
---
diff --git a/src/modules/ndb_redis/redis_client.c b/src/modules/ndb_redis/redis_client.c
index bd97012c8e..15a86f7b10 100644
--- a/src/modules/ndb_redis/redis_client.c
+++ b/src/modules/ndb_redis/redis_client.c
@@ -1032,13 +1032,6 @@ int redisc_exec(str *srv, str *res, str *cmd, ...)
}
}
- LM_DBG("rpl->rplRedis->type:%d\n", rpl->rplRedis->type);
- if(rpl->rplRedis->type == REDIS_REPLY_ERROR) {
- LM_ERR("Redis error:%.*s\n",
- (int)rpl->rplRedis->len, rpl->rplRedis->str);
- goto error_exec;
- }
-
if (check_cluster_reply(rpl->rplRedis, &rsrv)) {
LM_DBG("rsrv->ctxRedis = %p\n", rsrv->ctxRedis);
if(rsrv->ctxRedis==NULL)
@@ -1073,14 +1066,15 @@ int redisc_exec(str *srv, str *res, str *cmd, ...)
goto error_exec;
}
}
+ }
- LM_DBG("rpl->rplRedis->type:%d\n", rpl->rplRedis->type);
- if(rpl->rplRedis->type == REDIS_REPLY_ERROR) {
- LM_ERR("Redis error:%.*s\n",
- (int)rpl->rplRedis->len, rpl->rplRedis->str);
- goto error_exec;
- }
+ LM_DBG("rpl->rplRedis->type:%d\n", rpl->rplRedis->type);
+ if(rpl->rplRedis->type == REDIS_REPLY_ERROR) {
+ LM_ERR("Redis error:%.*s\n",
+ (int)rpl->rplRedis->len, rpl->rplRedis->str);
+ goto error_exec;
}
+
STR_ZTOV(cmd->s[cmd->len], c);
rsrv->disable.consecutive_errors = 0;
va_end(ap);