[svn:qpsmtpd] rev 395 - branches/high_perf/lib/Qpsmtpd

[email protected] 10 Mar 2005 18:19:28 -0000
Newsgroups perl.cvs.qpsmtpd
Message-ID <[email protected]>
Author: msergeant
Date: Thu Mar 10 10:19:27 2005
New Revision: 395

Modified:
   branches/high_perf/lib/Qpsmtpd/PollServer.pm
   branches/high_perf/lib/Qpsmtpd/SMTP.pm
   branches/high_perf/lib/Qpsmtpd/Transaction.pm
Log:
body_write patches from Brian Grossman


Modified: branches/high_perf/lib/Qpsmtpd/PollServer.pm
==============================================================================
--- branches/high_perf/lib/Qpsmtpd/PollServer.pm	(original)
+++ branches/high_perf/lib/Qpsmtpd/PollServer.pm	Thu Mar 10 10:19:27 2005
@@ -302,6 +302,7 @@
         $header = Mail::Header->new(Modify => 0, MailFrom => "COERCE");
         $self->transaction->header($header);
     }
+    
     # only true if client authenticated
     if ( defined $self->{_auth} and $self->{_auth} == OK ) { 
         $header->add("X-Qpsmtpd-Auth","True");

Modified: branches/high_perf/lib/Qpsmtpd/SMTP.pm
==============================================================================
--- branches/high_perf/lib/Qpsmtpd/SMTP.pm	(original)
+++ branches/high_perf/lib/Qpsmtpd/SMTP.pm	Thu Mar 10 10:19:27 2005
@@ -454,7 +454,7 @@
         # save us buffering the mail content.
 
 	# Save the start of just the body itself	
-	$self->transaction->body_start($size);
+	$self->transaction->set_body_start();
 
       }
 

Modified: branches/high_perf/lib/Qpsmtpd/Transaction.pm
==============================================================================
--- branches/high_perf/lib/Qpsmtpd/Transaction.pm	(original)
+++ branches/high_perf/lib/Qpsmtpd/Transaction.pm	Thu Mar 10 10:19:27 2005
@@ -107,10 +107,12 @@
     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");