From db3c7e32a49b5fe6ddba18eab16e9258c26bfcf1 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 4 Jun 2009 03:18:28 +0200 Subject: removed unused dirs in antispam transaction context removed unused references to the spamdir and hamdir from the ast --- trainstore.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/trainstore.c b/trainstore.c index 055828d..bcd40be 100644 --- a/trainstore.c +++ b/trainstore.c @@ -40,8 +40,6 @@ static const char *hamdir = NULL; struct antispam_transaction_context { int count; - const char *spamdir; - const char *hamdir; }; int mkdir_rec(const char *dir, mode_t mask) { @@ -85,9 +83,6 @@ backend_start(struct mailbox *box __attr_unused__) mkdir_rec(spamdir, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); mkdir_rec(hamdir, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); - ast->spamdir = spamdir; - ast->hamdir = hamdir; - return ast; } @@ -142,7 +137,7 @@ int backend_handle_mail(struct mailbox_transaction_context *t, const char *date = NULL, *mail_id = NULL, *dest = NULL, *other = NULL; struct stat sb; - if (!ast->hamdir || !ast->spamdir) { + if (!hamdir || !spamdir) { mail_storage_set_error(t->box->storage, ME(NOTPOSSIBLE) "antispam plugin not configured"); @@ -186,12 +181,12 @@ int backend_handle_mail(struct mailbox_transaction_context *t, /* switch weather this should be ham or spam */ switch (wanted) { case CLASS_SPAM: - dest = ast->spamdir; - other = ast->hamdir; + dest = spamdir; + other = hamdir; break; case CLASS_NOTSPAM: - dest = ast->hamdir; - other = ast->spamdir; + dest = hamdir; + other = spamdir; break; } -- cgit v1.2.3