fix "use of uninitialized variable" warnings

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@76 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Ask Bjørn Hansen 2002-09-20 18:55:41 +00:00
parent 8aa2bac088
commit 499d1e6a4c
2 changed files with 10 additions and 2 deletions

View File

@ -1,7 +1,15 @@
2002/09/20
Avoid "use of uninitialized variable" warning when the "MAIL" or the
"RCPT" command is executed without a parameter.
Compatibility with perl 5.5.3.
2002/09/12 2002/09/12
Fix "Could not print" error message in the TcpServer object. (Thanks Fix "Could not print" error message in the TcpServer object. (Thanks
to Ross Mueller <ross@visual.com>) to Ross Mueller <ross@visual.com>)
2002/09/10 2002/09/10
dnsbl plugin queues lookups in the background upon connect but dnsbl plugin queues lookups in the background upon connect but
doesn't block for the results until they are needed, greatly doesn't block for the results until they are needed, greatly

View File

@ -157,7 +157,7 @@ sub ehlo {
sub mail { sub mail {
my $self = shift; my $self = shift;
return $self->respond(501, "syntax error in parameters") if $_[0] !~ m/^from:/i; return $self->respond(501, "syntax error in parameters") if !$_[0] or $_[0] !~ m/^from:/i;
# -> from RFC2821 # -> from RFC2821
# The MAIL command (or the obsolete SEND, SOML, or SAML commands) # The MAIL command (or the obsolete SEND, SOML, or SAML commands)
@ -219,7 +219,7 @@ sub mail {
sub rcpt { sub rcpt {
my $self = shift; my $self = shift;
return $self->respond(501, "syntax error in parameters") unless $_[0] =~ m/^to:/i; return $self->respond(501, "syntax error in parameters") unless $_[0] and $_[0] =~ m/^to:/i;
return $self->respond(503, "Use MAIL before RCPT") unless $self->transaction->sender; return $self->respond(503, "Use MAIL before RCPT") unless $self->transaction->sender;
my ($rcpt) = ($_[0] =~ m/to:(.*)/i)[0]; my ($rcpt) = ($_[0] =~ m/to:(.*)/i)[0];