aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/protocol.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2024-04-29 16:21:56 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2024-04-29 16:23:51 +0100
commit12f965bf98a0c89b67d132c2a5ec196378c49893 (patch)
tree60f7f156017ab1ce1f9eadd59301ce4b034f8add /src/libserver/protocol.c
parentc3e5d3d6fc58322fa41dc787fcf4cd32dfe72f22 (diff)
downloadrspamd-12f965bf98a0c89b67d132c2a5ec196378c49893.tar.gz
rspamd-12f965bf98a0c89b67d132c2a5ec196378c49893.zip
[Fix] Allow to set 0 as number of rows to disable roll history
Issue: #4947 Closes: #4947
Diffstat (limited to 'src/libserver/protocol.c')
-rw-r--r--src/libserver/protocol.c4
1 files changed, 3 insertions, 1 deletions
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");