]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Add more priority for config file symbols registered from UCL
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 26 Apr 2016 11:16:58 +0000 (12:16 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 26 Apr 2016 11:17:32 +0000 (12:17 +0100)
src/libserver/cfg_rcl.c
src/plugins/lua/spamassassin.lua

index db4d26b7685313861aba0ca1f235fd49d211e0c1..b35aeacc30b38ddd9e1055c65fff0930cc463257 100644 (file)
@@ -358,7 +358,7 @@ rspamd_rcl_symbol_handler (rspamd_mempool_t *pool, const ucl_object_t *obj,
                priority = ucl_object_toint (elt);
        }
        else {
-               priority = ucl_object_get_priority (obj);
+               priority = ucl_object_get_priority (obj) + 1;
        }
 
        elt = ucl_object_lookup (obj, "description");
index f90a838c301e264613eb66142c32be3094698a11..0083d8bb4fdbd658e42f92842b2b7c34d2f79067 100644 (file)
@@ -1415,7 +1415,7 @@ local function post_process()
           rspamd_config:set_metric_symbol({
             name = k, score = r['score'],
             description = r['description'],
-            priority = 1,
+            priority = 2,
             one_shot = true })
           scores_added[k] = 1
         end
@@ -1478,7 +1478,7 @@ local function post_process()
     if not scores_added[key] then
       rspamd_config:set_metric_symbol({
             name = key, score = score,
-            priority = 1, flags = 'ignore'})
+            priority = 2, flags = 'ignore'})
     end
   end, scores)