From: Vsevolod Stakhov Date: Mon, 4 May 2015 21:46:33 +0000 (+0100) Subject: Fix http proxy startup. X-Git-Tag: 0.9.0~99 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3db7c93cd8cc299420b09d10319eff9a8b572621;p=rspamd.git Fix http proxy startup. --- diff --git a/src/http_proxy.c b/src/http_proxy.c index 8138c694f..48a81512b 100644 --- a/src/http_proxy.c +++ b/src/http_proxy.c @@ -104,7 +104,10 @@ http_proxy_parse_upstream (rspamd_mempool_t *pool, { const ucl_object_t *elt; struct rspamd_http_upstream *up = NULL; - struct http_proxy_ctx *ctx = ud; + struct http_proxy_ctx *ctx; + struct rspamd_rcl_struct_parser *pd = ud; + + ctx = pd->user_struct; if (ucl_object_type (obj) != UCL_OBJECT) { g_set_error (err, http_proxy_quark (), 100, @@ -160,6 +163,8 @@ http_proxy_parse_upstream (rspamd_mempool_t *pool, g_hash_table_insert (ctx->upstreams, up->name, up); + return TRUE; + err: if (up) { @@ -413,6 +418,7 @@ start_http_proxy (struct rspamd_worker *worker) /* XXX: stupid default */ ctx->keys_cache = rspamd_keypair_cache_new (256); + ctx->local_key = rspamd_http_connection_gen_key (); event_base_loop (ctx->ev_base, 0);