This CL appears to remove the functionality of processing the hook's
return value.  Am I misreading it?

-R

At Sat, 18 Aug 2007 23:49:43 -0700 (PDT),
[EMAIL PROTECTED] wrote:
> 
> Author: vetinari
> Date: Sat Aug 18 23:49:42 2007
> New Revision: 772
> 
> Modified:
>    trunk/lib/Qpsmtpd/SMTP/Prefork.pm
> 
> Log:
> unrecognized command fix for 
> http://code.google.com/p/smtpd/issues/detail?id=16
> - the reporters poposed fix would have caused two messages for the client on
>   return(DENY, ...) or a really unknown command.
> 
> 
> Modified: trunk/lib/Qpsmtpd/SMTP/Prefork.pm
> ==============================================================================
> --- trunk/lib/Qpsmtpd/SMTP/Prefork.pm (original)
> +++ trunk/lib/Qpsmtpd/SMTP/Prefork.pm Sat Aug 18 23:49:42 2007
> @@ -10,22 +10,8 @@
>    $self->{_counter}++; 
>  
>    if ($cmd !~ /^(\w{1,12})$/ or !exists $self->{_commands}->{$1}) {
> -    my ($rc, @msg) = $self->run_hooks("unrecognized_command", $cmd, @_);
> -    @msg = map { split /\n/ } @msg;
> -    if ($rc == DENY_DISCONNECT) {
> -      $self->respond(521, @msg);
> -      $self->disconnect;
> -    }
> -    elsif ($rc == DENY) {
> -      $self->respond(500, @msg);
> -    }
> -    elsif ($rc == DONE) {
> -      1;
> -    }
> -    else {
> -      $self->respond(500, "Unrecognized command");
> -    }
> -    return 1
> +    $self->run_hooks("unrecognized_command", $cmd, @_);
> +    return 1;
>    }
>    $cmd = $1;
>  

Reply via email to