Author: jpeacock
Date: Wed Mar 1 09:25:51 2006
New Revision: 627
Modified:
branches/0.3x/lib/Qpsmtpd/SMTP.pm
Log:
Need to cover situation where there are *no* hooks. Should we actually return
OK from run_hooks() in the case where no hooks are there to fire?
Modified: branches/0.3x/lib/Qpsmtpd/SMTP.pm
==============================================================================
--- branches/0.3x/lib/Qpsmtpd/SMTP.pm (original)
+++ branches/0.3x/lib/Qpsmtpd/SMTP.pm Wed Mar 1 09:25:51 2006
@@ -597,7 +597,7 @@
if ($rc == DONE) {
return 1;
}
- elsif ($rc != OK and $rc != DECLINED) {
+ elsif ($rc != OK and $rc != DECLINED and $rc != 0 ) {
return $self->log(LOGERROR, "pre plugin returned illegal value");
return 0;
}
@@ -624,7 +624,7 @@
# And finally run any queue_post hooks
($rc, $msg) = $self->run_hooks("queue_post");
- $self->log(LOGERROR, $msg) unless $rc == OK;
+ $self->log(LOGERROR, $msg) unless ($rc == OK or $rc == 0);
}