aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/task.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-04-22 14:43:00 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-04-22 14:43:00 +0100
commit7de497b731406b0dceba4a86075d4086f5bd936a (patch)
tree4921a21cf035a999bc07785aa7c7a960e1c2787e /src/libserver/task.h
parente6d42dffd5367ca97a09167194f027727313af59 (diff)
downloadrspamd-7de497b731406b0dceba4a86075d4086f5bd936a.tar.gz
rspamd-7de497b731406b0dceba4a86075d4086f5bd936a.zip
Unify task scan functions.
Diffstat (limited to 'src/libserver/task.h')
-rw-r--r--src/libserver/task.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/libserver/task.h b/src/libserver/task.h
index f8f7c89e3..0891dc6e2 100644
--- a/src/libserver/task.h
+++ b/src/libserver/task.h
@@ -76,7 +76,7 @@ struct rspamd_task {
gint sock; /**< socket descriptor */
gboolean is_mime; /**< if this task is mime task */
gboolean is_json; /**< output is JSON */
- gboolean allow_learn; /**< allow learning */
+ gboolean skip_extra_filters; /**< skip pre and post filters */
gboolean is_skipped; /**< whether message was skipped by configuration */
gchar *helo; /**< helo header value */
@@ -162,4 +162,16 @@ void rspamd_task_restore (void *arg);
*/
gboolean rspamd_task_fin (void *arg);
+/**
+ * Process task from http message and write reply or call task->fin_handler
+ * @param task task to process
+ * @param msg incoming http message
+ * @param classify_pool classify pool (or NULL)
+ * @param process_extra_filters whether to check pre and post filters
+ * @return task has been successfully parsed and processed
+ */
+gboolean rspamd_task_process (struct rspamd_task *task,
+ struct rspamd_http_message *msg, GThreadPool *classify_pool,
+ gboolean process_extra_filters);
+
#endif /* TASK_H_ */