From 12f965bf98a0c89b67d132c2a5ec196378c49893 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 29 Apr 2024 16:21:56 +0100 Subject: [Fix] Allow to set 0 as number of rows to disable roll history Issue: #4947 Closes: #4947 --- src/libserver/protocol.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/libserver') diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c index 5de980352..c8c7bc76a 100644 --- a/src/libserver/protocol.c +++ b/src/libserver/protocol.c @@ -1666,7 +1666,9 @@ void rspamd_protocol_http_reply(struct rspamd_http_message *msg, } if (!(task->flags & RSPAMD_TASK_FLAG_NO_LOG)) { - rspamd_roll_history_update(task->worker->srv->history, task); + if (task->worker->srv->history) { + rspamd_roll_history_update(task->worker->srv->history, task); + } } else { msg_debug_protocol("skip history update due to no log flag"); -- cgit v1.2.3