aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2009-06-04 03:18:28 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2009-06-04 03:18:28 +0200
commitdb3c7e32a49b5fe6ddba18eab16e9258c26bfcf1 (patch)
tree0b8edc8f510caa5770fa1f5961e74896042d765f
parent1c094155986f54a1a6faf3032e9d94b14dde8dd4 (diff)
downloaddovecot-antispam-db3c7e32a49b5fe6ddba18eab16e9258c26bfcf1.tar.gz
dovecot-antispam-db3c7e32a49b5fe6ddba18eab16e9258c26bfcf1.tar.xz
dovecot-antispam-db3c7e32a49b5fe6ddba18eab16e9258c26bfcf1.zip
removed unused dirs in antispam transaction context
removed unused references to the spamdir and hamdir from the ast
Diffstat (limited to '')
-rw-r--r--trainstore.c15
1 files 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;
}