[svn:qpsmtpd] rev 481 - in branches/v031/lib: . Apache
[email protected] 7 Jul 2005 20:10:04 -0000
| Newsgroups | perl.cvs.qpsmtpd |
|---|---|
| Message-ID | <[email protected]> |
Author: msergeant
Date: Thu Jul 7 13:10:03 2005
New Revision: 481
Modified:
branches/v031/lib/Apache/Qpsmtpd.pm
branches/v031/lib/Qpsmtpd.pm
Log:
Revert to proper versions
Modified: branches/v031/lib/Apache/Qpsmtpd.pm
==============================================================================
--- branches/v031/lib/Apache/Qpsmtpd.pm (original)
+++ branches/v031/lib/Apache/Qpsmtpd.pm Thu Jul 7 13:10:03 2005
@@ -16,7 +16,6 @@ use APR::Bucket ();
use APR::Socket ();
use Apache2::Filter ();
use ModPerl::Util ();
-use Apache::Scoreboard;
our $VERSION = '0.02';
@@ -56,7 +55,7 @@ sub start_connection {
my $remote_host = $opts{host} || ( $opts{ip} ? "[$opts{ip}]" : "[noip!]");
my $remote_info = $opts{info} ? "$opts{info}\@$remote_host" : $remote_host;
my $remote_ip = $opts{ip};
-
+
$self->log(LOGNOTICE, "Connection from $remote_info [$remote_ip]");
$self->SUPER::connection->start(
Modified: branches/v031/lib/Qpsmtpd.pm
==============================================================================
--- branches/v031/lib/Qpsmtpd.pm (original)
+++ branches/v031/lib/Qpsmtpd.pm Thu Jul 7 13:10:03 2005
@@ -4,8 +4,6 @@ use vars qw($VERSION $Logger $TraceLevel
use Sys::Hostname;
use Qpsmtpd::Constants;
-use Qpsmtpd::Transaction;
-use Qpsmtpd::Connection;
$VERSION = "0.31-dev";
@@ -116,25 +114,17 @@ sub config_dir {
my $configdir = ($ENV{QMAIL} || '/var/qmail') . '/control';
my ($name) = ($0 =~ m!(.*?)/([^/]+)$!);
$configdir = "$name/config" if (-e "$name/config/$config");
- if (exists $ENV{QPSMTPD_CONFIG}) {
- $configdir = $ENV{QPSMTPD_CONFIG} if (-e "$ENV{QPSMTPD_CONFIG}/$config");
- }
return $configdir;
}
sub plugin_dir {
- my $self = shift;
- my $plugin_dir = $self->config('plugin_dir', "NOLOG");
- unless (defined($plugin_dir)) {
- my ($name) = ($0 =~ m!(.*?)/([^/]+)$!);
- $plugin_dir = "$name/plugins";
- }
- return $plugin_dir;
+ my ($name) = ($0 =~ m!(.*?)/([^/]+)$!);
+ my $dir = "$name/plugins";
}
sub get_qmail_config {
my ($self, $config, $type) = @_;
- $self->log(LOGDEBUG, "trying to get config for $config") unless $type and $type eq "NOLOG";
+ $self->log(LOGDEBUG, "trying to get config for $config");
if ($self->{_config_cache}->{$config}) {
return wantarray ? @{$self->{_config_cache}->{$config}} : $self->{_config_cache}->{$config}->[0];
}
@@ -256,6 +246,10 @@ sub _load_plugins {
return @ret;
}
+sub transaction {
+ return {}; # base class implements empty transaction
+}
+
sub run_hooks {
my ($self, $hook) = (shift, shift);
my $hooks = $self->{hooks};
@@ -353,22 +347,6 @@ sub spool_dir {
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;