commit 987f56f: [Minor] Well, I've said `mirrors`!

Vsevolod Stakhov vsevolod at rspamd.com
Wed Mar 30 20:14:06 UTC 2022


Author: Vsevolod Stakhov
Date: 2022-03-30 21:08:00 +0100
URL: https://github.com/rspamd/rspamd/commit/987f56f4e2d9e7785f69a5a9068435881c80550d (HEAD -> master)

[Minor] Well, I've said `mirrors`!

---
 src/rspamd_proxy.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c
index bdf3e1a14..d875c0efe 100644
--- a/src/rspamd_proxy.c
+++ b/src/rspamd_proxy.c
@@ -506,6 +506,15 @@ rspamd_proxy_parse_mirror (rspamd_mempool_t *pool,
 		return FALSE;
 	}
 
+	if (!rspamd_config_is_enabled_from_ucl (pool, obj)) {
+		/* Upstream is valid but disabled */
+		msg_info_pool_check("upstream %s is disabled",
+				ucl_object_lookup (obj, "name") ?
+				ucl_object_tostring(ucl_object_lookup (obj, "name")) :
+				ucl_object_key (obj));
+		return TRUE;
+	}
+
 	up = rspamd_mempool_alloc0 (pool, sizeof (*up));
 
 	elt = ucl_object_lookup (obj, "name");


More information about the Commits mailing list