aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/backends/redis_backend.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstat/backends/redis_backend.c')
-rw-r--r--src/libstat/backends/redis_backend.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/libstat/backends/redis_backend.c b/src/libstat/backends/redis_backend.c
index 26f33b0a1..eab238532 100644
--- a/src/libstat/backends/redis_backend.c
+++ b/src/libstat/backends/redis_backend.c
@@ -98,7 +98,6 @@ struct rspamd_redis_stat_cbdata {
redisAsyncContext *redis;
ucl_object_t *cur;
GPtrArray *cur_keys;
- guint
struct upstream *selected;
guint inflight;
gboolean wanna_die;
@@ -847,7 +846,7 @@ rspamd_redis_stat_keys (redisAsyncContext *c, gpointer r, gpointer priv)
{
struct rspamd_redis_stat_elt *redis_elt = (struct rspamd_redis_stat_elt *)priv;
struct rspamd_redis_stat_cbdata *cbdata;
- redisReply *reply = r, *more, **elts, *elt;
+ redisReply *reply = r, *more, *elts, *elt;
gchar **pk, *k;
guint i, processed = 0;
@@ -861,8 +860,8 @@ rspamd_redis_stat_keys (redisAsyncContext *c, gpointer r, gpointer priv)
if (c->err == 0 && r != NULL) {
if (reply->type == REDIS_REPLY_ARRAY) {
- more = r.element[0]
- elts = r.element[1]
+ more = reply->element[0];
+ elts = reply->element[1];
g_ptr_array_set_size (cbdata->cur_keys, elts->elements);
@@ -916,7 +915,7 @@ rspamd_redis_stat_keys (redisAsyncContext *c, gpointer r, gpointer priv)
}
}
- if (more != NULL && more.integer) {
+ if (more != NULL && more->integer) {
/* Cleanup the cbdata->cur_keys and re-allowcate */
for (i = 0; i < cbdata->cur_keys->len; i ++) {
k = g_ptr_array_index (cbdata->cur_keys, i);
@@ -930,7 +929,7 @@ rspamd_redis_stat_keys (redisAsyncContext *c, gpointer r, gpointer priv)
/* Get more keys */
redisAsyncCommand (cbdata->redis, rspamd_redis_stat_keys, redis_elt,
"SSCAN %s_keys %d COUNT 1000",
- ctx->stcf->symbol, more.integer);
+ cbdata->elt->ctx->stcf->symbol, more->integer);
}
else {
/* Set up the required keys */