From: Vsevolod Stakhov Date: Tue, 5 May 2015 14:28:20 +0000 (+0100) Subject: Use default backend if no other backends specified. X-Git-Tag: 0.9.0~95 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cf8308a8f10a165392350f7690a3839f48b7c3a0;p=thirdparty%2Frspamd.git Use default backend if no other backends specified. --- diff --git a/src/http_proxy.c b/src/http_proxy.c index 66e03c8f14..12df0492b0 100644 --- a/src/http_proxy.c +++ b/src/http_proxy.c @@ -294,6 +294,10 @@ proxy_client_finish_handler (struct rspamd_http_connection *conn, } else { backend = g_hash_table_lookup (session->ctx->upstreams, host); + + if (backend == NULL) { + backend = session->ctx->default_upstream; + } } if (backend == NULL) { @@ -409,7 +413,6 @@ void start_http_proxy (struct rspamd_worker *worker) { struct http_proxy_ctx *ctx = worker->ctx; - GError *err = NULL; ctx->ev_base = rspamd_prepare_worker (worker, "http_proxy", proxy_accept_socket);