diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-08-12 12:35:13 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-08-12 12:35:13 +0100 |
commit | d4d921a97e5a8548fb506ed8bc747d9a2bc37561 (patch) | |
tree | b3647b472e4e08680d0ce4464a353a5cbc05a35a /src/libserver | |
parent | 22ef30cfeca05d3eaa6fc570959232798cc82de3 (diff) | |
download | rspamd-d4d921a97e5a8548fb506ed8bc747d9a2bc37561.tar.gz rspamd-d4d921a97e5a8548fb506ed8bc747d9a2bc37561.zip |
[Rework] Rename filter.h to a more sane name
Diffstat (limited to 'src/libserver')
-rw-r--r-- | src/libserver/cfg_utils.c | 2 | ||||
-rw-r--r-- | src/libserver/composites.c | 6 | ||||
-rw-r--r-- | src/libserver/dynamic_cfg.c | 2 | ||||
-rw-r--r-- | src/libserver/milter.c | 2 | ||||
-rw-r--r-- | src/libserver/protocol.c | 12 | ||||
-rw-r--r-- | src/libserver/protocol.h | 2 | ||||
-rw-r--r-- | src/libserver/roll_history.c | 2 | ||||
-rw-r--r-- | src/libserver/rspamd_symcache.c | 4 | ||||
-rw-r--r-- | src/libserver/task.c | 8 | ||||
-rw-r--r-- | src/libserver/task.h | 6 |
10 files changed, 23 insertions, 23 deletions
diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c index cec8c6f67..1872a68ec 100644 --- a/src/libserver/cfg_utils.c +++ b/src/libserver/cfg_utils.c @@ -18,7 +18,7 @@ #include "cfg_file.h" #include "rspamd.h" #include "cfg_file_private.h" -#include "filter.h" +#include "scan_result.h" #include "lua/lua_common.h" #include "lua/lua_thread_pool.h" #include "map.h" diff --git a/src/libserver/composites.c b/src/libserver/composites.c index 4d8329376..92ccd4f15 100644 --- a/src/libserver/composites.c +++ b/src/libserver/composites.c @@ -18,7 +18,7 @@ #include "expression.h" #include "task.h" #include "utlist.h" -#include "filter.h" +#include "scan_result.h" #include "composites.h" #include <math.h> @@ -46,7 +46,7 @@ INIT_LOG_MODULE(composites) struct composites_data { struct rspamd_task *task; struct rspamd_composite *composite; - struct rspamd_metric_result *metric_res; + struct rspamd_scan_result *metric_res; GHashTable *symbols_to_remove; guint8 *checked; }; @@ -540,7 +540,7 @@ composites_remove_symbols (gpointer key, gpointer value, gpointer data) } static void -composites_metric_callback (struct rspamd_metric_result *metric_res, +composites_metric_callback (struct rspamd_scan_result *metric_res, struct rspamd_task *task) { struct composites_data *cd = diff --git a/src/libserver/dynamic_cfg.c b/src/libserver/dynamic_cfg.c index 984a26697..45c6838ec 100644 --- a/src/libserver/dynamic_cfg.c +++ b/src/libserver/dynamic_cfg.c @@ -16,7 +16,7 @@ #include "config.h" #include "rspamd.h" #include "map.h" -#include "filter.h" +#include "scan_result.h" #include "dynamic_cfg.h" #include "unix-std.h" #include "lua/lua_common.h" diff --git a/src/libserver/milter.c b/src/libserver/milter.c index 28e0df1c7..2dfe7a53b 100644 --- a/src/libserver/milter.c +++ b/src/libserver/milter.c @@ -26,7 +26,7 @@ #include "libutil/http_private.h" #include "libserver/protocol_internal.h" #include "libserver/cfg_file_private.h" -#include "libmime/filter.h" +#include "libmime/scan_result.h" #include "libserver/worker_util.h" #include "utlist.h" diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c index dd840284a..e62333262 100644 --- a/src/libserver/protocol.c +++ b/src/libserver/protocol.c @@ -20,7 +20,7 @@ #include "http_private.h" #include "worker_private.h" #include "libserver/cfg_file_private.h" -#include "libmime/filter_private.h" +#include "libmime/scan_result_private.h" #include "contrib/zstd/zstd.h" #include "lua/lua_common.h" #include "unix-std.h" @@ -1126,8 +1126,8 @@ rspamd_metric_symbol_ucl (struct rspamd_task *task, struct rspamd_symbol_result } static ucl_object_t * -rspamd_metric_result_ucl (struct rspamd_task *task, - struct rspamd_metric_result *mres, ucl_object_t *top) +rspamd_scan_result_ucl (struct rspamd_task *task, + struct rspamd_scan_result *mres, ucl_object_t *top) { struct rspamd_symbol_result *sym; gboolean is_spam; @@ -1349,7 +1349,7 @@ rspamd_protocol_write_ucl (struct rspamd_task *task, (rspamd_mempool_destruct_t)ucl_object_unref, top); if (flags & RSPAMD_PROTOCOL_METRICS) { - rspamd_metric_result_ucl (task, task->result, top); + rspamd_scan_result_ucl (task, task->result, top); } if (flags & RSPAMD_PROTOCOL_MESSAGES) { @@ -1488,7 +1488,7 @@ void rspamd_protocol_http_reply (struct rspamd_http_message *msg, struct rspamd_task *task, ucl_object_t **pobj) { - struct rspamd_metric_result *metric_res; + struct rspamd_scan_result *metric_res; const struct rspamd_re_cache_stat *restat; ucl_object_t *top = NULL; @@ -1723,7 +1723,7 @@ rspamd_protocol_write_log_pipe (struct rspamd_task *task) struct rspamd_worker_log_pipe *lp; struct rspamd_protocol_log_message_sum *ls; lua_State *L = task->cfg->lua_state; - struct rspamd_metric_result *mres; + struct rspamd_scan_result *mres; struct rspamd_symbol_result *sym; gint id, i; guint32 n = 0, nextra = 0; diff --git a/src/libserver/protocol.h b/src/libserver/protocol.h index 280ceedcb..2ba10e926 100644 --- a/src/libserver/protocol.h +++ b/src/libserver/protocol.h @@ -7,7 +7,7 @@ #define RSPAMD_PROTOCOL_H #include "config.h" -#include "filter.h" +#include "scan_result.h" #include "http_connection.h" #include "task.h" diff --git a/src/libserver/roll_history.c b/src/libserver/roll_history.c index ceed8d04f..1a742a441 100644 --- a/src/libserver/roll_history.c +++ b/src/libserver/roll_history.c @@ -101,7 +101,7 @@ rspamd_roll_history_update (struct roll_history *history, { guint row_num; struct roll_history_row *row; - struct rspamd_metric_result *metric_res; + struct rspamd_scan_result *metric_res; struct history_metric_callback_data cbdata; struct rspamd_action *action; diff --git a/src/libserver/rspamd_symcache.c b/src/libserver/rspamd_symcache.c index bba4db617..ad5bd4e1c 100644 --- a/src/libserver/rspamd_symcache.c +++ b/src/libserver/rspamd_symcache.c @@ -225,7 +225,7 @@ struct cache_savepoint { gboolean profile; gdouble profile_start; - struct rspamd_metric_result *rs; + struct rspamd_scan_result *rs; gdouble lim; struct rspamd_symcache_item *cur_item; @@ -1417,7 +1417,7 @@ static gboolean rspamd_symcache_metric_limit (struct rspamd_task *task, struct cache_savepoint *cp) { - struct rspamd_metric_result *res; + struct rspamd_scan_result *res; double ms; if (task->flags & RSPAMD_TASK_FLAG_PASS_ALL) { diff --git a/src/libserver/task.c b/src/libserver/task.c index e14ce5c5f..acec922a7 100644 --- a/src/libserver/task.c +++ b/src/libserver/task.c @@ -15,7 +15,7 @@ */ #include "task.h" #include "rspamd.h" -#include "filter.h" +#include "scan_result.h" #include "libserver/protocol.h" #include "libserver/protocol_internal.h" #include "message.h" @@ -29,7 +29,7 @@ #include "libserver/mempool_vars_internal.h" #include "libserver/cfg_file_private.h" #include "libmime/lang_detection.h" -#include "libmime/filter_private.h" +#include "libmime/scan_result_private.h" #ifdef WITH_JEMALLOC #include <jemalloc/jemalloc.h> @@ -1041,7 +1041,7 @@ rspamd_task_log_metric_res (struct rspamd_task *task, { static gchar scorebuf[32]; rspamd_ftok_t res = {.begin = NULL, .len = 0}; - struct rspamd_metric_result *mres; + struct rspamd_scan_result *mres; gboolean first = TRUE; rspamd_fstring_t *symbuf; struct rspamd_symbol_result *sym; @@ -1555,7 +1555,7 @@ rspamd_task_write_log (struct rspamd_task *task) } gdouble -rspamd_task_get_required_score (struct rspamd_task *task, struct rspamd_metric_result *m) +rspamd_task_get_required_score (struct rspamd_task *task, struct rspamd_scan_result *m) { gint i; diff --git a/src/libserver/task.h b/src/libserver/task.h index 39d6d9b76..9086578d7 100644 --- a/src/libserver/task.h +++ b/src/libserver/task.h @@ -178,7 +178,7 @@ struct rspamd_task { struct rspamd_task_data_storage msg; /**< message buffer */ struct rspamd_http_connection *http_conn; /**< HTTP server connection */ struct rspamd_async_session *s; /**< async session object */ - struct rspamd_metric_result *result; /**< Metric result */ + struct rspamd_scan_result *result; /**< Metric result */ GHashTable *lua_cache; /**< cache of lua objects */ GPtrArray *tokens; /**< statistics tokens */ GArray *meta_words; /**< rspamd_stat_token_t produced from meta headers @@ -301,10 +301,10 @@ gboolean rspamd_learn_task_spam (struct rspamd_task *task, * @param m * @return */ -struct rspamd_metric_result; +struct rspamd_scan_result; gdouble rspamd_task_get_required_score (struct rspamd_task *task, - struct rspamd_metric_result *m); + struct rspamd_scan_result *m); /** * Returns the first header as value for a header |