aboutsummaryrefslogtreecommitdiffstats
path: root/crm114-exec.c
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2011-05-03 19:26:38 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2011-05-03 19:26:38 +0200
commita1527ce7177df11a8ee1b46a0e7b64f0f0df234b (patch)
tree41f724c2a04b3582878d40dc451930e71a7b86aa /crm114-exec.c
parentc8a9a6550b84412f919b772a9cb8db1e3ef79d19 (diff)
parent808eaa49efe2dc2438ef98ddf4bac4cfd2898a3d (diff)
downloaddovecot-antispam-master.tar.gz
dovecot-antispam-master.tar.xz
dovecot-antispam-master.zip
merge with base/masterHEADmaster
Diffstat (limited to 'crm114-exec.c')
-rw-r--r--crm114-exec.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/crm114-exec.c b/crm114-exec.c
index 7727409..ea0babc 100644
--- a/crm114-exec.c
+++ b/crm114-exec.c
@@ -129,7 +129,7 @@ struct antispam_transaction_context {
struct siglist *siglist;
};
-struct antispam_transaction_context *
+static struct antispam_transaction_context *
backend_start(struct mailbox *box __attr_unused__)
{
struct antispam_transaction_context *ast;
@@ -139,13 +139,13 @@ backend_start(struct mailbox *box __attr_unused__)
return ast;
}
-void backend_rollback(struct antispam_transaction_context *ast)
+static void backend_rollback(struct antispam_transaction_context *ast)
{
signature_list_free(&ast->siglist);
i_free(ast);
}
-int backend_commit(struct mailbox_transaction_context *ctx,
+static int backend_commit(struct mailbox_transaction_context *ctx,
struct antispam_transaction_context *ast)
{
struct siglist *item = ast->siglist;
@@ -167,14 +167,14 @@ int backend_commit(struct mailbox_transaction_context *ctx,
return ret;
}
-int backend_handle_mail(struct mailbox_transaction_context *t,
- struct antispam_transaction_context *ast,
- struct mail *mail, enum classification want)
+static int backend_handle_mail(struct mailbox_transaction_context *t,
+ struct antispam_transaction_context *ast,
+ struct mail *mail, enum classification want)
{
return signature_extract_to_list(t, mail, &ast->siglist, want);
}
-void backend_init(pool_t pool)
+static void backend_init(pool_t pool)
{
const char *tmp;
int i;
@@ -198,6 +198,15 @@ void backend_init(pool_t pool)
signature_init();
}
-void backend_exit(void)
+static void backend_exit(void)
{
}
+
+struct backend crm114_backend = {
+ .init = backend_init,
+ .exit = backend_exit,
+ .handle_mail = backend_handle_mail,
+ .start = backend_start,
+ .rollback = backend_rollback,
+ .commit = backend_commit,
+};