]> source.dussan.org Git - rspamd.git/commitdiff
Fix initialization order.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 5 Dec 2013 00:02:28 +0000 (00:02 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 5 Dec 2013 00:02:28 +0000 (00:02 +0000)
src/plugins/fuzzy_check.c

index 304de560a0927a985447fc061bb012fbdbc0d984..1a165787895e05c124d45ebcadf9144cbd976e49 100644 (file)
@@ -342,6 +342,13 @@ fuzzy_parse_rule (struct config_file *cfg, ucl_object_t *obj)
                }
        }
 
+       if ((value = ucl_object_find_key (obj, "max_score")) != NULL) {
+               rule->max_score = ucl_obj_todouble (value);
+       }
+       if ((value = ucl_object_find_key (obj, "read_only")) != NULL) {
+               rule->read_only = ucl_obj_toboolean (value);
+       }
+
        if ((value = ucl_object_find_key (obj, "servers")) != NULL) {
                if (value->type == UCL_ARRAY) {
                        value = value->value.av;
@@ -367,13 +374,6 @@ fuzzy_parse_rule (struct config_file *cfg, ucl_object_t *obj)
                }
        }
 
-       if ((value = ucl_object_find_key (obj, "max_score")) != NULL) {
-               rule->max_score = ucl_obj_todouble (value);
-       }
-       if ((value = ucl_object_find_key (obj, "read_only")) != NULL) {
-               rule->read_only = ucl_obj_toboolean (value);
-       }
-
        return 0;
 }