commit 0609488: [Minor] Allow 'default' to be the default result

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Apr 14 15:14:06 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-04-14 16:07:37 +0100
URL: https://github.com/rspamd/rspamd/commit/0609488580672b56ef856a9ec06caff6fa8976e0 (HEAD -> master)

[Minor] Allow 'default' to be the default result

---
 src/libmime/scan_result.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/libmime/scan_result.c b/src/libmime/scan_result.c
index d299aa2ee..fb8024928 100644
--- a/src/libmime/scan_result.c
+++ b/src/libmime/scan_result.c
@@ -897,6 +897,9 @@ rspamd_find_metric_result (struct rspamd_task *task,
 	if (name == NULL) {
 		return task->result;
 	}
+	else if (strcmp (name, "default") == 0) {
+		return task->result;
+	}
 
 	DL_FOREACH (task->result, res) {
 		if (res->name && strcmp (res->name, name) == 0) {


More information about the Commits mailing list