Module: kamailio
Branch: master
Commit: 5557b9b715a9ca754c454b5edaebf2a43b832015
URL:
https://github.com/kamailio/kamailio/commit/5557b9b715a9ca754c454b5edaebf2a…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2020-09-21T09:49:25+02:00
ndb_redis: fix cluster support
fixes #2461 related #2300
---
Modified: src/modules/ndb_redis/redis_client.c
---
Diff:
https://github.com/kamailio/kamailio/commit/5557b9b715a9ca754c454b5edaebf2a…
Patch:
https://github.com/kamailio/kamailio/commit/5557b9b715a9ca754c454b5edaebf2a…
---
diff --git a/src/modules/ndb_redis/redis_client.c b/src/modules/ndb_redis/redis_client.c
index 5ad063f89a..5bc1bf0e47 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);