summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-12-22 13:27:28 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-12-22 13:27:28 +0000
commit324701717d9cb8f97f4e2565dde4fdd129e245c4 (patch)
tree8bda60ce016bb05805a1e80c09f2dbdb755753cf /src
parente5026b003d4ce221af2e3505af499f4083d5ce65 (diff)
downloadrspamd-324701717d9cb8f97f4e2565dde4fdd129e245c4.tar.gz
rspamd-324701717d9cb8f97f4e2565dde4fdd129e245c4.zip
Add tag for all commands and replies.
Diffstat (limited to 'src')
-rw-r--r--src/fuzzy_storage.c5
-rw-r--r--src/libserver/fuzzy_backend.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c
index 7b3c58c43..8c32b423a 100644
--- a/src/fuzzy_storage.c
+++ b/src/fuzzy_storage.c
@@ -192,9 +192,11 @@ rspamd_fuzzy_write_reply (struct fuzzy_session *session,
static void
rspamd_fuzzy_process_command (struct fuzzy_session *session)
{
- struct rspamd_fuzzy_reply rep = {0, 0, 0.0};
+ struct rspamd_fuzzy_reply rep = {0, 0, 0, 0.0};
gboolean res = FALSE;
+ rep.tag = session->cmd->tag;
+
if (session->cmd->cmd == FUZZY_CHECK) {
rep = rspamd_fuzzy_backend_check (session->ctx->backend, session->cmd,
session->ctx->expire);
@@ -288,6 +290,7 @@ accept_fuzzy_socket (gint fd, short what, void *arg)
lcmd.flag = l->flag;
lcmd.shingles_count = 0;
lcmd.value = l->value;
+ lcmd.tag = 0;
cmd = &lcmd;
}
else if ((guint)r >= sizeof (struct rspamd_fuzzy_cmd)) {
diff --git a/src/libserver/fuzzy_backend.c b/src/libserver/fuzzy_backend.c
index 89facaa68..480e97b15 100644
--- a/src/libserver/fuzzy_backend.c
+++ b/src/libserver/fuzzy_backend.c
@@ -546,7 +546,7 @@ struct rspamd_fuzzy_reply
rspamd_fuzzy_backend_check (struct rspamd_fuzzy_backend *backend,
const struct rspamd_fuzzy_cmd *cmd, gint64 expire)
{
- struct rspamd_fuzzy_reply rep = {0, 0, 0.0};
+ struct rspamd_fuzzy_reply rep = {0, 0, 0, 0.0};
const struct rspamd_fuzzy_shingle_cmd *shcmd;
int rc;
gint64 timestamp;