From: Don Armstrong Date: Thu, 16 Feb 2012 03:11:10 +0000 (-0800) Subject: populate nn if queue_file is not given X-Git-Tag: release/2.6.0~415^2~13 X-Git-Url: https://git.donarmstrong.com/?p=debbugs.git;a=commitdiff_plain;h=064f880f53b91c0466a469e9d7f10ff84d7c49d7 populate nn if queue_file is not given --- diff --git a/Debbugs/Mail.pm b/Debbugs/Mail.pm index c19be79..ad2df8c 100644 --- a/Debbugs/Mail.pm +++ b/Debbugs/Mail.pm @@ -43,7 +43,7 @@ use base qw(Exporter); use IPC::Open3; use POSIX qw(:sys_wait_h strftime); -use Time::HiRes qw(usleep); +use Time::HiRes qw(usleep gettimeofday); use Mail::Address (); use Debbugs::MIME qw(encode_rfc1522); use Debbugs::Config qw(:config); @@ -204,7 +204,7 @@ sub default_headers { # calculate our headers my $bug_num = exists $param{data} ? $param{data}{bug_num} : 'x'; - my $nn = $param{queue_file}; + my $nn = exists $param{queue_file} ? $param{queue_file} : join('',gettimeofday()); # handle the user giving the actual queue filename instead of nn $nn =~ s/^[a-zA-Z]([a-zA-Z])/$1/; $nn = lc($nn); @@ -250,7 +250,7 @@ sub default_headers { ($header,$default_header{$header}); } else { - push @other_headers,($header,$header_order{lc($header)}); + push @other_headers,($header,$default_header{$header}); } } my @headers;