diff options
Diffstat (limited to 'src/kvstorage_server.c')
-rw-r--r-- | src/kvstorage_server.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kvstorage_server.c b/src/kvstorage_server.c index afdc8b163..50497f919 100644 --- a/src/kvstorage_server.c +++ b/src/kvstorage_server.c @@ -353,12 +353,12 @@ kvstorage_read_socket (f_str_t * in, void *arg) } else { r = rspamd_snprintf (outbuf, sizeof (outbuf), "VALUE %s %ud %ud" CRLF, - elt->key, elt->flags, elt->size); + ELT_KEY (elt), elt->flags, elt->size); if (!rspamd_dispatcher_write (session->dispather, outbuf, r, TRUE, FALSE)) { return FALSE; } - if (!rspamd_dispatcher_write (session->dispather, elt->data, elt->size, TRUE, TRUE)) { + if (!rspamd_dispatcher_write (session->dispather, ELT_DATA(elt), elt->size, TRUE, TRUE)) { return FALSE; } return rspamd_dispatcher_write (session->dispather, CRLF "END" CRLF, @@ -371,7 +371,7 @@ kvstorage_read_socket (f_str_t * in, void *arg) if (elt != NULL) { if ((elt->flags & KV_ELT_DIRTY) == 0) { /* Free memory if backend has deleted this element */ - g_slice_free1 (elt->size + sizeof (struct rspamd_kv_element), elt); + g_slice_free1 (ELT_SIZE (elt), elt); } g_static_rw_lock_writer_unlock (&session->cf->storage->rwlock); return rspamd_dispatcher_write (session->dispather, "DELETED" CRLF, |