diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2011-05-03 19:26:38 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2011-05-03 19:26:38 +0200 |
commit | a1527ce7177df11a8ee1b46a0e7b64f0f0df234b (patch) | |
tree | 41f724c2a04b3582878d40dc451930e71a7b86aa /crm114-exec.c | |
parent | c8a9a6550b84412f919b772a9cb8db1e3ef79d19 (diff) | |
parent | 808eaa49efe2dc2438ef98ddf4bac4cfd2898a3d (diff) | |
download | dovecot-antispam-master.tar.gz dovecot-antispam-master.tar.xz dovecot-antispam-master.zip |
Diffstat (limited to 'crm114-exec.c')
-rw-r--r-- | crm114-exec.c | 25 |
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, +}; |