log/summarize: set undefined strings as empty str

avoids undef warnings
This commit is contained in:
Matt Simerson 2013-12-17 23:44:35 -05:00
parent 2416d1e940
commit 012a7a4918

View File

@ -136,14 +136,14 @@ sub handle_dispatch {
my ($message, $pid, $line) = @_; my ($message, $pid, $line) = @_;
if ($message =~ /^dispatching MAIL FROM/i) { if ($message =~ /^dispatching MAIL FROM/i) {
my ($from) = $message =~ /<(.*?)>/; my ($from) = $message =~ /<(.*?)>/;
$pids{$pid}{from} = $from; $pids{$pid}{from} = $from || '';
} }
elsif ($message =~ /^dispatching RCPT TO/i) { elsif ($message =~ /^dispatching RCPT TO/i) {
my ($to) = $message =~ /<(.*?)>/; my ($to) = $message =~ /<(.*?)>/;
$pids{$pid}{to} = $to; $pids{$pid}{to} = $to || '';
} }
elsif ($message =~ m/dispatching (EHLO|HELO) (.*)/) { elsif ($message =~ m/dispatching (EHLO|HELO) (.*)/) {
$pids{$pid}{helo_host} = $2; $pids{$pid}{helo_host} = $2 || '';
} }
elsif ($message eq 'dispatching DATA') { } elsif ($message eq 'dispatching DATA') { }
elsif ($message eq 'dispatching QUIT') { } elsif ($message eq 'dispatching QUIT') { }