[svn:qpsmtpd] rev 386 - in branches/high_perf: . lib lib/Qpsmtpd

[email protected] 8 Mar 2005 19:56:15 -0000
Newsgroups perl.cvs.qpsmtpd
Message-ID <[email protected]>
Author: msergeant
Date: Tue Mar  8 11:56:15 2005
New Revision: 386

Added:
   branches/high_perf/   (props changed)
      - copied from rev 382, trunk/
   branches/high_perf/lib/Qpsmtpd/Transaction.pm
      - copied unchanged from rev 385, trunk/lib/Qpsmtpd/Transaction.pm
Modified:
   branches/high_perf/lib/Qpsmtpd.pm
   branches/high_perf/lib/Qpsmtpd/SMTP.pm
Log:
high performance branch


Modified: branches/high_perf/lib/Qpsmtpd.pm
==============================================================================
--- trunk/lib/Qpsmtpd.pm	(original)
+++ branches/high_perf/lib/Qpsmtpd.pm	Tue Mar  8 11:56:15 2005
@@ -4,6 +4,8 @@
 
 use Sys::Hostname;
 use Qpsmtpd::Constants;
+use Qpsmtpd::Transaction;
+use Qpsmtpd::Connection;
 
 $VERSION = "0.29";
 sub TRACE_LEVEL { $LogLevel }
@@ -196,10 +198,6 @@
   return @ret;
 }
 
-sub transaction {
-    return {}; # base class implements empty transaction
-}
-
 sub run_hooks {
   my ($self, $hook) = (shift, shift);
   my $hooks = $self->{hooks};
@@ -286,6 +284,22 @@
   return $spool_dir;
 }
 
+sub transaction {
+    my $self = shift;
+    return $self->{_transaction} || $self->reset_transaction();
+}
+
+sub reset_transaction {
+    my $self = shift;
+    $self->run_hooks("reset_transaction") if $self->{_transaction};
+    return $self->{_transaction} = Qpsmtpd::Transaction->new();
+}
+
+sub connection {
+  my $self = shift;
+  return $self->{_connection} || ($self->{_connection} = Qpsmtpd::Connection->new());
+}
+
 # For unique filenames. We write to a local tmp dir so we don't need
 # to make them unpredictable.
 my $transaction_counter = 0; 

Modified: branches/high_perf/lib/Qpsmtpd/SMTP.pm
==============================================================================
--- trunk/lib/Qpsmtpd/SMTP.pm	(original)
+++ branches/high_perf/lib/Qpsmtpd/SMTP.pm	Tue Mar  8 11:56:15 2005
@@ -110,24 +110,6 @@
     }
 }
 
-sub transaction {
-  my $self = shift;
-  return $self->{_transaction} || $self->reset_transaction();
-}
-
-sub reset_transaction {
-  my $self = shift;
-  $self->run_hooks("reset_transaction") if $self->{_transaction};
-  return $self->{_transaction} = Qpsmtpd::Transaction->new();
-}
-
-
-sub connection {
-  my $self = shift;
-  return $self->{_connection} || ($self->{_connection} = Qpsmtpd::Connection->new());
-}
-
-
 sub helo {
   my ($self, $hello_host, @stuff) = @_;
   return $self->respond (501,