commit dad9634: [Minor] Avoid logging of the error in case of settings usage

Vsevolod Stakhov vsevolod at highsecure.ru
Fri Jun 12 10:35:08 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-06-12 11:26:46 +0100
URL: https://github.com/rspamd/rspamd/commit/dad96346a3dcc03594b330aaedeef970e8ad21a7

[Minor] Avoid logging of the error in case of settings usage

---
 src/lua/lua_task.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index 75c2f0a99..9b9ef7efc 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -2022,7 +2022,7 @@ lua_task_insert_result_common (lua_State * L, struct rspamd_scan_result *result,
 				}
 			}
 		}
-		else {
+		else if (task->settings == NULL) {
 			lua_pushfstring (L, "insertion failed for %s", symbol_name);
 			rspamd_lua_traceback (L);
 
@@ -2030,6 +2030,10 @@ lua_task_insert_result_common (lua_State * L, struct rspamd_scan_result *result,
 
 			lua_pop (L, 2); /* Traceback string + error string */
 		}
+		else {
+			/* Usually denied by settings */
+
+		}
 
 	}
 	else {


More information about the Commits mailing list