diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-07-22 15:41:54 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-07-22 15:41:54 +0100 |
commit | f6777d7faea262b8ce3b537f0ca9fa233dd4d5dd (patch) | |
tree | cbff0d057d1e6bf4ab96ac38a19d9cbdefdda17a /src | |
parent | 3fbe20e679c56105d34dca2f8a0bf3f376728ce1 (diff) | |
download | rspamd-f6777d7faea262b8ce3b537f0ca9fa233dd4d5dd.tar.gz rspamd-f6777d7faea262b8ce3b537f0ca9fa233dd4d5dd.zip |
Remove hard dependency on settings.
Diffstat (limited to 'src')
-rw-r--r-- | src/libmime/filter.c | 3 | ||||
-rw-r--r-- | src/libmime/filter.h | 2 | ||||
-rw-r--r-- | src/libmime/smtp_utils.c | 1 | ||||
-rw-r--r-- | src/libserver/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/libserver/cfg_rcl.c | 1 | ||||
-rw-r--r-- | src/libserver/cfg_utils.c | 1 | ||||
-rw-r--r-- | src/libserver/protocol.c | 1 | ||||
-rw-r--r-- | src/libserver/task.c | 3 | ||||
-rw-r--r-- | src/libserver/task.h | 2 | ||||
-rw-r--r-- | src/smtp_proxy.c | 1 |
10 files changed, 5 insertions, 11 deletions
diff --git a/src/libmime/filter.c b/src/libmime/filter.c index 9932b814d..5c3594665 100644 --- a/src/libmime/filter.c +++ b/src/libmime/filter.c @@ -30,7 +30,6 @@ #include "cfg_file.h" #include "util.h" #include "expressions.h" -#include "settings.h" #include "binlog.h" #include "diff.h" #include "classifiers/classifiers.h" @@ -80,8 +79,6 @@ insert_metric_result (struct rspamd_task *task, struct metric *metric, const gch metric_res->metric = metric; metric_res->grow_factor = 0; metric_res->score = 0; - metric_res->domain_settings = NULL; - metric_res->user_settings = NULL; apply_metric_settings (task, metric, metric_res); g_hash_table_insert (task->results, (gpointer) metric->name, metric_res); } diff --git a/src/libmime/filter.h b/src/libmime/filter.h index 7c3f3e51e..2891ebd00 100644 --- a/src/libmime/filter.h +++ b/src/libmime/filter.h @@ -65,8 +65,6 @@ struct metric_result { GHashTable *symbols; /**< symbols of metric */ gboolean checked; /**< whether metric result is consolidated */ double grow_factor; /**< current grow factor */ - struct rspamd_settings *user_settings; /**< settings for metric */ - struct rspamd_settings *domain_settings; /**< settings for metric */ }; /** diff --git a/src/libmime/smtp_utils.c b/src/libmime/smtp_utils.c index 5d8f94f64..28d4b6cf3 100644 --- a/src/libmime/smtp_utils.c +++ b/src/libmime/smtp_utils.c @@ -24,7 +24,6 @@ #include "config.h" #include "main.h" #include "filter.h" -#include "settings.h" #include "smtp.h" #include "smtp_proto.h" diff --git a/src/libserver/CMakeLists.txt b/src/libserver/CMakeLists.txt index b46a88ffd..290e4c301 100644 --- a/src/libserver/CMakeLists.txt +++ b/src/libserver/CMakeLists.txt @@ -12,7 +12,6 @@ SET(LIBRSPAMDSERVERSRC protocol.c proxy.c roll_history.c - settings.c spf.c statfile.c statfile_sync.c diff --git a/src/libserver/cfg_rcl.c b/src/libserver/cfg_rcl.c index be9f63593..6347e3869 100644 --- a/src/libserver/cfg_rcl.c +++ b/src/libserver/cfg_rcl.c @@ -23,7 +23,6 @@ #include "cfg_rcl.h" #include "main.h" -#include "settings.h" #include "cfg_file.h" #include "lua/lua_common.h" #include "expressions.h" diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c index d041faa50..71821244a 100644 --- a/src/libserver/cfg_utils.c +++ b/src/libserver/cfg_utils.c @@ -28,7 +28,6 @@ #include "cfg_file.h" #include "main.h" #include "filter.h" -#include "settings.h" #include "classifiers/classifiers.h" #include "lua/lua_common.h" #include "kvstorage_config.h" diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c index 6f22b5f34..fc4096f8c 100644 --- a/src/libserver/protocol.c +++ b/src/libserver/protocol.c @@ -26,7 +26,6 @@ #include "main.h" #include "util.h" #include "cfg_file.h" -#include "settings.h" #include "message.h" /* Max line size */ diff --git a/src/libserver/task.c b/src/libserver/task.c index d19362fca..a46a70604 100644 --- a/src/libserver/task.c +++ b/src/libserver/task.c @@ -249,6 +249,9 @@ rspamd_task_free (struct rspamd_task *task, gboolean is_soft) if (task->sock != -1) { close (task->sock); } + if (task->settings != NULL) { + ucl_object_unref (task->settings); + } rspamd_mempool_delete (task->task_pool); g_slice_free1 (sizeof (struct rspamd_task), task); } diff --git a/src/libserver/task.h b/src/libserver/task.h index 1d2b299ec..4c3462d9a 100644 --- a/src/libserver/task.h +++ b/src/libserver/task.h @@ -138,6 +138,8 @@ struct rspamd_task { enum rspamd_metric_action action; /**< Action of pre filters */ gchar *str; /**< String describing action */ } pre_result; /**< Result of pre-filters */ + + ucl_object_t *settings; /**< Settings applied to task */ }; /** diff --git a/src/smtp_proxy.c b/src/smtp_proxy.c index f5f7856a1..c2df491b6 100644 --- a/src/smtp_proxy.c +++ b/src/smtp_proxy.c @@ -28,7 +28,6 @@ #include "smtp_proto.h" #include "map.h" #include "message.h" -#include "settings.h" #include "dns.h" #include "upstream.h" #include "proxy.h" |