Work around splitting up of return values in hooks

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@733 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Matt Sergeant 2007-04-10 18:08:55 +00:00
parent a87b5b07cc
commit c2e2f29878

View File

@ -695,12 +695,12 @@ sub data_respond {
sub received_line { sub received_line {
my ($self, $smtp, $authheader, $sslheader) = @_; my ($self, $smtp, $authheader, $sslheader) = @_;
my ($rc, $received) = $self->run_hooks("received_line", $smtp, $authheader, $sslheader); my ($rc, @received) = $self->run_hooks("received_line", $smtp, $authheader, $sslheader);
if ($rc == YIELD) { if ($rc == YIELD) {
die "YIELD not supported for received_line hook"; die "YIELD not supported for received_line hook";
} }
elsif ($rc == OK) { elsif ($rc == OK) {
return $received; return join("\n", @received);
} }
else { # assume $rc == DECLINED else { # assume $rc == DECLINED
return "from ".$self->connection->remote_info return "from ".$self->connection->remote_info