diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-01-29 23:06:45 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-01-29 23:06:45 +0000 |
commit | 9bcf7906eeb645e18f6ac95b5544f0da2c169eb2 (patch) | |
tree | 774f662476e0904457d5d7490bbd2da550a33fa7 /src/libutil/http.c | |
parent | 58af43bae578a62f9f67ba842516e9afe78dfb05 (diff) | |
download | rspamd-9bcf7906eeb645e18f6ac95b5544f0da2c169eb2.tar.gz rspamd-9bcf7906eeb645e18f6ac95b5544f0da2c169eb2.zip |
Fix keys initialization.
Diffstat (limited to 'src/libutil/http.c')
-rw-r--r-- | src/libutil/http.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/libutil/http.c b/src/libutil/http.c index 8fd0e7448..1b2338509 100644 --- a/src/libutil/http.c +++ b/src/libutil/http.c @@ -1197,6 +1197,7 @@ rspamd_http_new_message (enum http_parser_type type) new->port = 80; new->type = type; new->method = HTTP_GET; + new->peer_key = NULL; return new; } @@ -1761,7 +1762,7 @@ rspamd_http_connection_set_key (struct rspamd_http_connection *conn, } void -rspamd_http_connection_key_destroy (gpointer key) +rspamd_http_connection_key_unref (gpointer key) { struct rspamd_http_keypair *kp = (struct rspamd_http_keypair *)key; @@ -1769,6 +1770,17 @@ rspamd_http_connection_key_destroy (gpointer key) REF_RELEASE (kp); } +gpointer +rspamd_http_connection_key_ref (gpointer key) +{ + struct rspamd_http_keypair *kp = (struct rspamd_http_keypair *)key; + + g_assert (key != NULL); + REF_RETAIN (kp); + + return kp; +} + GString * rspamd_http_connection_make_peer_key (const gchar *key) { |