diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-01-29 23:34:23 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-01-29 23:34:23 +0000 |
commit | 6eac3649f809f91e3ee53e8d7ace2c4ead8b848c (patch) | |
tree | cca2610c513cc1d3b6f3a185d71fd125034c5979 /src/client | |
parent | 9bcf7906eeb645e18f6ac95b5544f0da2c169eb2 (diff) | |
download | rspamd-6eac3649f809f91e3ee53e8d7ace2c4ead8b848c.tar.gz rspamd-6eac3649f809f91e3ee53e8d7ace2c4ead8b848c.zip |
Fix issues with base32 encoding.
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/rspamdclient.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/client/rspamdclient.c b/src/client/rspamdclient.c index 1d119eb18..3073b85bf 100644 --- a/src/client/rspamdclient.c +++ b/src/client/rspamdclient.c @@ -154,19 +154,24 @@ rspamd_client_init (struct event_base *ev_base, const gchar *name, 0, RSPAMD_HTTP_CLIENT); + conn->server_name = g_string_new (name); + if (port != 0) { + rspamd_printf_gstring (conn->server_name, ":%d", (int)port); + } + + double_to_tv (timeout, &conn->timeout); + if (key) { conn->key = rspamd_http_connection_make_peer_key (key); if (conn->key) { conn->keypair = rspamd_http_connection_gen_key (); rspamd_http_connection_set_key (conn->http_conn, conn->key); } + else { + rspamd_client_destroy (conn); + return NULL; + } } - conn->server_name = g_string_new (name); - if (port != 0) { - rspamd_printf_gstring (conn->server_name, ":%d", (int)port); - } - - double_to_tv (timeout, &conn->timeout); return conn; } |