]> source.dussan.org Git - rspamd.git/commitdiff
Fix symbols output in the webui.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 15 May 2015 13:56:31 +0000 (14:56 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 15 May 2015 13:56:31 +0000 (14:56 +0100)
interface
src/controller.c

index f21ffa4ce6e35af6fa6c318971c7a58719b4c524..766599cad32bc948ee64adb9f32de22ab64b9e6c 160000 (submodule)
--- a/interface
+++ b/interface
@@ -1 +1 @@
-Subproject commit f21ffa4ce6e35af6fa6c318971c7a58719b4c524
+Subproject commit 766599cad32bc948ee64adb9f32de22ab64b9e6c
index 11ead024fe29e17f7a17c8b66295135f7444d1e8..815aa125b80dfda97b753e82ac290980961f1cd5 100644 (file)
@@ -483,7 +483,7 @@ rspamd_controller_handle_symbols (struct rspamd_http_connection_entry *conn_ent,
        GHashTableIter it;
        struct rspamd_symbols_group *gr;
        struct rspamd_symbol_def *sym, *cur;
-       ucl_object_t *obj, *top, *sym_obj;
+       ucl_object_t *obj, *top, *sym_obj, *group_symbols;
        gpointer k, v;
 
        if (!rspamd_controller_check_password (conn_ent, session, msg, FALSE)) {
@@ -502,6 +502,8 @@ rspamd_controller_handle_symbols (struct rspamd_http_connection_entry *conn_ent,
                /* Iterate through all symbols */
                sym = gr->symbols;
 
+               group_symbols = ucl_object_typed_new (UCL_ARRAY);
+
                LL_FOREACH (sym, cur) {
                        sym_obj = ucl_object_typed_new (UCL_OBJECT);
 
@@ -516,9 +518,10 @@ rspamd_controller_handle_symbols (struct rspamd_http_connection_entry *conn_ent,
                                        "description", 0, false);
                        }
 
-                       ucl_object_insert_key (obj, sym_obj, "rules", 0, false);
+                       ucl_array_append (group_symbols, sym_obj);
                }
 
+               ucl_object_insert_key (obj, group_symbols, "rules", 0, false);
                ucl_array_append (top, obj);
        }