From 6ecc991a20831298294de62c4f1f3a8de97ba4df Mon Sep 17 00:00:00 2001 From: Matt Sergeant Date: Thu, 10 Mar 2005 18:18:28 +0000 Subject: [PATCH] body_write patches from Brian Grossman git-svn-id: https://svn.perl.org/qpsmtpd/trunk@394 958fd67b-6ff1-0310-b445-bb7760255be9 --- lib/Qpsmtpd/SMTP.pm | 2 +- lib/Qpsmtpd/Transaction.pm | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Qpsmtpd/SMTP.pm b/lib/Qpsmtpd/SMTP.pm index b52564f..d50bfac 100644 --- a/lib/Qpsmtpd/SMTP.pm +++ b/lib/Qpsmtpd/SMTP.pm @@ -472,7 +472,7 @@ sub data { # save us buffering the mail content. # Save the start of just the body itself - $self->transaction->body_start($size); + $self->transaction->set_body_start(); } diff --git a/lib/Qpsmtpd/Transaction.pm b/lib/Qpsmtpd/Transaction.pm index 9455cea..6fe8596 100644 --- a/lib/Qpsmtpd/Transaction.pm +++ b/lib/Qpsmtpd/Transaction.pm @@ -107,10 +107,12 @@ sub body_write { while ($$ref =~ m/\G(.*?\n)/gc) { push @{ $self->{_body_array} }, $1; $self->{_body_size} += length($1); + ++$self->{_body_current_pos}; } if ($$ref =~ m/\G(.+)\z/gc) { push @{ $self->{_body_array} }, $1; $self->{_body_size} += length($1); + ++$self->{_body_current_pos}; } if ($self->{_body_size} >= $self->{_size_threshold}) { #warn("spooling to disk\n");