aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-06-06 14:35:31 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-06-06 14:35:31 +0100
commit44fbf9709b76d89db14f8dba0cc7ca15fb3e7954 (patch)
treea99617913e8c6e7229a24c9ee95af0fd3025af04
parent73191561c568864f0cf8ccba5917822365ff5064 (diff)
downloadrspamd-44fbf9709b76d89db14f8dba0cc7ca15fb3e7954.tar.gz
rspamd-44fbf9709b76d89db14f8dba0cc7ca15fb3e7954.zip
Remove endless counter incrementing.
In some cases it is not enough to perform compare and exchange and we still can get race condition in atomic incrementing. Therefore, it is better to loose a history event than to log error message each time.
-rw-r--r--src/roll_history.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/roll_history.c b/src/roll_history.c
index 69f141762..4206a6a8b 100644
--- a/src/roll_history.c
+++ b/src/roll_history.c
@@ -101,7 +101,8 @@ rspamd_roll_history_update (struct roll_history *history, struct worker_task *ta
row->completed = FALSE;
}
else {
- msg_err ("internal error with history roll occured, row number is invalid: %d", row_num);
+ /* Race condition */
+ history->cur_row = 0;
return;
}