aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/backends
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-02-12 15:57:13 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-02-12 15:57:33 +0000
commit05d03bfcd69957c34af36fa65e44e602c489e46f (patch)
tree3ec5b75a3aca3b4752cc0e72b6d8ebf337053943 /src/libstat/backends
parentb358d2f752fb3b559bacda0e7c3c3dc68933e277 (diff)
downloadrspamd-05d03bfcd69957c34af36fa65e44e602c489e46f.tar.gz
rspamd-05d03bfcd69957c34af36fa65e44e602c489e46f.zip
[Minor] Fix Redis query
Diffstat (limited to 'src/libstat/backends')
-rw-r--r--src/libstat/backends/redis_backend.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libstat/backends/redis_backend.c b/src/libstat/backends/redis_backend.c
index 6e0201db9..df631f722 100644
--- a/src/libstat/backends/redis_backend.c
+++ b/src/libstat/backends/redis_backend.c
@@ -1702,12 +1702,13 @@ rspamd_redis_learn_tokens (struct rspamd_task *task, GPtrArray *tokens,
"HINCRBY\r\n"
"$%d\r\n"
"%s\r\n"
- "$6\r\n"
+ "$%d\r\n"
"%s\r\n" /* Learned key */
"$1\r\n"
"1\r\n",
(gint)strlen (rt->redis_object_expanded),
rt->redis_object_expanded,
+ (gint)strlen (learned_key),
learned_key);
}
else {
@@ -1717,12 +1718,13 @@ rspamd_redis_learn_tokens (struct rspamd_task *task, GPtrArray *tokens,
"HINCRBY\r\n"
"$%d\r\n"
"%s\r\n"
- "$6\r\n"
+ "$%d\r\n"
"%s\r\n" /* Learned key */
"$2\r\n"
"-1\r\n",
(gint)strlen (rt->redis_object_expanded),
rt->redis_object_expanded,
+ (gint)strlen (learned_key),
learned_key);
}