Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2019-06-12 13:50:50 +0300
committerPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2019-06-12 13:50:50 +0300
commitac9dca0a925de9cd87268c1e4629893cc436e50c (patch)
tree1694310f98a5d10b680b369abb601ff0fba3b65b /cluster_library.c
parent4852a5106a10d52dee8b570a9736aa37cf606661 (diff)
Fix xInfo ro RedisCluster
Diffstat (limited to 'cluster_library.c')
-rw-r--r--cluster_library.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/cluster_library.c b/cluster_library.c
index dd1e0bbc..2e926963 100644
--- a/cluster_library.c
+++ b/cluster_library.c
@@ -2314,6 +2314,24 @@ cluster_xclaim_resp(INTERNAL_FUNCTION_PARAMETERS, redisCluster *c, void *ctx) {
}
+/* XINFO */
+PHP_REDIS_API void
+cluster_xinfo_resp(INTERNAL_FUNCTION_PARAMETERS, redisCluster *c, void *ctx)
+{
+ zval z_ret;
+
+ array_init(&z_ret);
+ if (redis_read_xinfo_response(c->cmd_sock, &z_ret, c->reply_len) != SUCCESS) {
+ zval_dtor(&z_ret);
+ CLUSTER_RETURN_FALSE(c);
+ }
+
+ if (CLUSTER_IS_ATOMIC(c)) {
+ RETURN_ZVAL(&z_ret, 0, 1);
+ }
+ add_next_index_zval(&c->multi_resp, &z_ret);
+}
+
/* MULTI BULK response loop where we might pull the next one */
PHP_REDIS_API zval *cluster_zval_mbulk_resp(INTERNAL_FUNCTION_PARAMETERS,
redisCluster *c, int pull, mbulk_cb cb, zval *z_ret)