diff options
Diffstat (limited to '')
-rw-r--r-- | signature-log.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/signature-log.c b/signature-log.c index 5b7b306..7a9b422 100644 --- a/signature-log.c +++ b/signature-log.c @@ -44,7 +44,7 @@ struct antispam_transaction_context { struct dict_transaction_context *dict_ctx; }; -struct antispam_transaction_context * +static struct antispam_transaction_context * backend_start(struct mailbox *box __attr_unused__) { struct antispam_transaction_context *ast; @@ -59,7 +59,7 @@ 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) { if (ast->dict) { // dict_transaction_rollback(ast->dict_ctx); @@ -69,7 +69,7 @@ void backend_rollback(struct antispam_transaction_context *ast) i_free(ast); } -int backend_commit(struct mailbox_transaction_context *ctx __attr_unused__, +static int backend_commit(struct mailbox_transaction_context *ctx __attr_unused__, struct antispam_transaction_context *ast) { int ret = 0; @@ -84,9 +84,9 @@ int backend_commit(struct mailbox_transaction_context *ctx __attr_unused__, return ret; } -int backend_handle_mail(struct mailbox_transaction_context *t, - struct antispam_transaction_context *ast, - struct mail *mail, enum classification wanted) +static int backend_handle_mail(struct mailbox_transaction_context *t, + struct antispam_transaction_context *ast, + struct mail *mail, enum classification wanted) { const char *signature; int ret; @@ -128,7 +128,7 @@ int backend_handle_mail(struct mailbox_transaction_context *t, ast->dict_ctx = dict_transaction_begin(ast->dict); signature = t_strconcat("priv/", signature, NULL); dict_atomic_inc(ast->dict_ctx, signature, inc); - ret = dict_transaction_commit(ast->dict_ctx); + ret = dict_transaction_commit(&ast->dict_ctx); if (ret) mail_storage_set_error(t->box->storage, ME(NOTPOSSIBLE) @@ -137,7 +137,7 @@ int backend_handle_mail(struct mailbox_transaction_context *t, return ret; } -void backend_init(pool_t pool __attr_unused__) +static void backend_init(pool_t pool __attr_unused__) { const char *tmp; @@ -156,6 +156,15 @@ void backend_init(pool_t pool __attr_unused__) signature_init(); } -void backend_exit(void) +static void backend_exit(void) { } + +struct backend signature_backend = { + .init = backend_init, + .exit = backend_exit, + .handle_mail = backend_handle_mail, + .start = backend_start, + .rollback = backend_rollback, + .commit = backend_commit, +}; |