body_write patches from Brian Grossman

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@394 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Matt Sergeant 2005-03-10 18:18:28 +00:00
parent 321622f0aa
commit 6ecc991a20
2 changed files with 3 additions and 1 deletions

View File

@ -472,7 +472,7 @@ sub data {
# save us buffering the mail content. # save us buffering the mail content.
# Save the start of just the body itself # Save the start of just the body itself
$self->transaction->body_start($size); $self->transaction->set_body_start();
} }

View File

@ -107,10 +107,12 @@ sub body_write {
while ($$ref =~ m/\G(.*?\n)/gc) { while ($$ref =~ m/\G(.*?\n)/gc) {
push @{ $self->{_body_array} }, $1; push @{ $self->{_body_array} }, $1;
$self->{_body_size} += length($1); $self->{_body_size} += length($1);
++$self->{_body_current_pos};
} }
if ($$ref =~ m/\G(.+)\z/gc) { if ($$ref =~ m/\G(.+)\z/gc) {
push @{ $self->{_body_array} }, $1; push @{ $self->{_body_array} }, $1;
$self->{_body_size} += length($1); $self->{_body_size} += length($1);
++$self->{_body_current_pos};
} }
if ($self->{_body_size} >= $self->{_size_threshold}) { if ($self->{_body_size} >= $self->{_size_threshold}) {
#warn("spooling to disk\n"); #warn("spooling to disk\n");