diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-07-19 14:46:08 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-07-19 14:46:08 +0100 |
commit | 6630ec81c7f33e631468057e705499fdd5aca9d5 (patch) | |
tree | 140c20b3743c184d1a23ff5c7dd46c3b5681cec9 | |
parent | e3149270b2f939e9bc47bbbabcb7ad519c0ba1d4 (diff) | |
download | rspamd-6630ec81c7f33e631468057e705499fdd5aca9d5.tar.gz rspamd-6630ec81c7f33e631468057e705499fdd5aca9d5.zip |
[CritFix] Fix writing CDPs to the database
Issue: #405
Reported by: @moisseev
-rw-r--r-- | src/libutil/rrd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libutil/rrd.c b/src/libutil/rrd.c index a230faf2b..ec061dd1a 100644 --- a/src/libutil/rrd.c +++ b/src/libutil/rrd.c @@ -1052,6 +1052,7 @@ rspamd_rrd_write_rra (struct rspamd_rrd_file *file, gulong *rra_steps) /* Iterate over DS */ for (j = 0; j < ds_cnt; j++) { cur_row[j] = cdp[j].scratch[CDP_primary_val].dv; + msg_debug_rrd ("write cdp %d: %.3f", j, cur_row[j]); } } @@ -1180,9 +1181,11 @@ rspamd_rrd_add_record (struct rspamd_rrd_file *file, rra_steps, i, pdp_temp); - /* Write RRA */ - rspamd_rrd_write_rra (file, rra_steps); + } + + /* Write RRA */ + rspamd_rrd_write_rra (file, rra_steps); } file->live_head->last_up = seconds; file->live_head->last_up_usec = microseconds; |