* lib/Qpsmtpd/Transaction.pm

Fix fairly egregious error.  If the size_threashold is smaller than
    the body while writing, the file handle would be closed prematurely.
    Ouch.  I don't like it here from a stylistic point of view, but at 
    least it will actually work now.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@553 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
John Peacock 2005-10-20 02:10:32 +00:00
parent e6efda626f
commit a8b6956d81

View File

@ -91,6 +91,7 @@ sub body_current_pos {
sub body_filename { sub body_filename {
my $self = shift; my $self = shift;
$self->body_spool() unless $self->{_filename}; $self->body_spool() unless $self->{_filename};
$self->{_body_file}->close(); # so contents won't be cached
return $self->{_filename}; return $self->{_filename};
} }
@ -107,7 +108,6 @@ sub body_spool {
$self->{_body_start} = $self->{_header_size}; $self->{_body_start} = $self->{_header_size};
} }
$self->{_body_array} = undef; $self->{_body_array} = undef;
$self->{_body_file}->close();
} }
sub body_write { sub body_write {