diff options
Diffstat (limited to 'src/libserver/protocol.c')
-rw-r--r-- | src/libserver/protocol.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c index d20c50ff8..5cd3589f6 100644 --- a/src/libserver/protocol.c +++ b/src/libserver/protocol.c @@ -1035,13 +1035,22 @@ rspamd_protocol_http_reply (struct rspamd_http_message *msg, action = rspamd_check_action_metric (task, metric_res->score, &required_score, metric_res->metric); if (action <= METRIC_ACTION_NOACTION) { +#ifndef HAVE_ATOMIC_BUILTINS task->worker->srv->stat->actions_stat[action]++; +#else + __atomic_add_fetch (&task->worker->srv->stat->actions_stat[action], + 1, __ATOMIC_RELEASE); +#endif } } /* Increase counters */ - +#ifndef HAVE_ATOMIC_BUILTINS task->worker->srv->stat->messages_scanned++; +#else + __atomic_add_fetch (&task->worker->srv->stat->messages_scanned, + 1, __ATOMIC_RELEASE); +#endif } } |