aboutsummaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-02 22:53:26 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-02 22:53:26 +0000
commitfec4b654dbc8e4fc98984a669b5ff88be5ed0976 (patch)
treebae975d1f23ae9d15683df810ac8f372753441eb /src/client
parentf1718ac5923a555efb0bfcac4c1859e6a9ac87c9 (diff)
downloadrspamd-fec4b654dbc8e4fc98984a669b5ff88be5ed0976.tar.gz
rspamd-fec4b654dbc8e4fc98984a669b5ff88be5ed0976.zip
Use keypairs cache.
Diffstat (limited to 'src/client')
-rw-r--r--src/client/rspamdclient.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/rspamdclient.c b/src/client/rspamdclient.c
index 1df619437..da873630f 100644
--- a/src/client/rspamdclient.c
+++ b/src/client/rspamdclient.c
@@ -24,6 +24,7 @@
#include "rspamdclient.h"
#include "util.h"
#include "http.h"
+#include "keypairs_cache.h"
#ifdef HAVE_FETCH_H
#include <fetch.h>
@@ -46,6 +47,7 @@ struct rspamd_client_connection {
struct rspamd_http_connection *http_conn;
gboolean req_sent;
struct rspamd_client_request *req;
+ struct rspamd_keypair_cache *keys_cache;
};
struct rspamd_client_request {
@@ -148,11 +150,13 @@ rspamd_client_init (struct event_base *ev_base, const gchar *name,
conn->ev_base = ev_base;
conn->fd = fd;
conn->req_sent = FALSE;
+ conn->keys_cache = rspamd_keypair_cache_new (32);
conn->http_conn = rspamd_http_connection_new (rspamd_client_body_handler,
rspamd_client_error_handler,
rspamd_client_finish_handler,
0,
- RSPAMD_HTTP_CLIENT);
+ RSPAMD_HTTP_CLIENT,
+ conn->keys_cache);
conn->server_name = g_string_new (name);
if (port != 0) {