develooper Front page | perl.cvs.qpsmtpd | Postings from March 2006

[svn:qpsmtpd] r627 - branches/0.3x/lib/Qpsmtpd

From:
jpeacock
Date:
March 1, 2006 09:26
Subject:
[svn:qpsmtpd] r627 - branches/0.3x/lib/Qpsmtpd
Message ID:
20060301172552.9C08ACBA2B@x12.develooper.com
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);
 }
 
 



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About