]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix assertion in graph handling
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 3 Jan 2017 16:44:38 +0000 (16:44 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 3 Jan 2017 17:07:18 +0000 (17:07 +0000)
src/controller.c

index cfb2df3a96506aa7fd33fae97925f2f06e8e0422..b780e3c4cf87690bed635c7b065007de2ea845fd 100644 (file)
@@ -1136,7 +1136,7 @@ rspamd_controller_handle_graph (
        struct rspamd_rrd_query_result *rrd_result;
        gulong i, k, start_row, cnt, t, ts, step;
        gdouble *acc;
-       ucl_object_t *res, *elt[4];
+       ucl_object_t *res, *elt[METRIC_ACTION_MAX];
        enum {
                rra_hourly = 0,
                rra_daily,
@@ -2566,7 +2566,6 @@ rspamd_controller_rrd_update (gint fd, short what, void *arg)
        gdouble points[METRIC_ACTION_MAX];
        GError *err = NULL;
        guint i;
-       gdouble val;
 
        g_assert (ctx->rrd != NULL);
        stat = ctx->srv->stat;