summaryrefslogtreecommitdiffstats
path: root/src/cfg_xml.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-07-02 17:20:10 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-07-02 17:20:10 +0100
commitffc3f67a0dd99df6ac5784753423cf65e8fd50c0 (patch)
tree09a6ddf6f42e545de3a0ab00b0284ccc00168d8a /src/cfg_xml.c
parent7f6ebe1b2903cb1c6b4a0425d0c9925ecc53a2e2 (diff)
downloadrspamd-ffc3f67a0dd99df6ac5784753423cf65e8fd50c0.tar.gz
rspamd-ffc3f67a0dd99df6ac5784753423cf65e8fd50c0.zip
Reverse a list of module options to preserve order.
Diffstat (limited to 'src/cfg_xml.c')
-rw-r--r--src/cfg_xml.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cfg_xml.c b/src/cfg_xml.c
index 8307e22a9..23564de95 100644
--- a/src/cfg_xml.c
+++ b/src/cfg_xml.c
@@ -2108,6 +2108,8 @@ rspamd_xml_end_element (GMarkupParseContext *context, const gchar *element_name,
CHECK_TAG ("module", FALSE);
if (res) {
if (ud->section_pointer != NULL) {
+ /* Reverse options list */
+ ud->section_pointer = g_list_reverse ((GList *)ud->section_pointer);
g_hash_table_insert (ud->cfg->modules_opts, ud->parent_pointer[0], ud->section_pointer);
memory_pool_add_destructor (ud->cfg->cfg_pool, (pool_destruct_func)g_list_free, ud->section_pointer);
ud->parent_pointer[0] = NULL;