Update of /cvsroot/popfile/engine/Proxy
In directory sc8-pr-cvs1:/tmp/cvs-serv4895/Proxy
Modified Files:
POP3.pm
Log Message:
Tiny bit of cleanup (mostly whitespace) on Sam's cool TOP caching fix
Index: POP3.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Proxy/POP3.pm,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -d -r1.57 -r1.58
*** POP3.pm 24 Jun 2003 03:31:02 -0000 1.57
--- POP3.pm 24 Jun 2003 13:38:27 -0000 1.58
***************
*** 113,118 ****
{
my ( $self, $client, $download_count, $pipe ) = @_;
!
! # Hash of indexes of downloaded messages
my %downloaded;
--- 113,118 ----
{
my ( $self, $client, $download_count, $pipe ) = @_;
!
! # Hash of indexes of downloaded messages
my %downloaded;
***************
*** 272,278 ****
if ( $2 ne '99999999' ) {
if ( $self->config_( 'toptoo' ) ) {
-
my $count = $1;
!
if ( $self->echo_response_($mail, $client, "RETR $1" ) ) {
--- 272,277 ----
if ( $2 ne '99999999' ) {
if ( $self->config_( 'toptoo' ) ) {
my $count = $1;
!
if ( $self->echo_response_($mail, $client, "RETR $1" ) ) {
***************
*** 344,360 ****
# is done so that fetchmail can be used with POPFile.
if ( ( $command =~ /RETR (.*)/i ) || ( $command =~ /TOP (.*) 99999999/i ) ) {
-
my $count = $1;
my $class;
-
my $file = $self->{classifier__}->history_filename($download_count, $count);
my $short_file = $file;
$short_file =~ s/^[^\/]*\///;
!
if (defined($downloaded{$count}) && open( RETRFILE, "<$file" ) ) {
# File has been fetched and classified already
!
$self->log_( "Printing message from cache" );
!
if (0) {
# Ensure a .CRLF is on the end of the file (may be neccessary)
--- 343,358 ----
# is done so that fetchmail can be used with POPFile.
if ( ( $command =~ /RETR (.*)/i ) || ( $command =~ /TOP (.*) 99999999/i ) ) {
my $count = $1;
my $class;
my $file = $self->{classifier__}->history_filename($download_count, $count);
+
my $short_file = $file;
$short_file =~ s/^[^\/]*\///;
!
if (defined($downloaded{$count}) && open( RETRFILE, "<$file" ) ) {
# File has been fetched and classified already
!
$self->log_( "Printing message from cache" );
!
if (0) {
# Ensure a .CRLF is on the end of the file (may be neccessary)
***************
*** 380,387 ****
$class = $self->{classifier__}->classify_and_modify( \*RETRFILE, $client, $download_count, 0, 1, '' );
!
print $pipe "CLASS:$class$eol";
! }
close RETRFILE;
print $client ".$eol";
--- 378,385 ----
$class = $self->{classifier__}->classify_and_modify( \*RETRFILE, $client, $download_count, 0, 1, '' );
!
print $pipe "CLASS:$class$eol";
! }
close RETRFILE;
print $client ".$eol";
***************
*** 397,401 ****
# Tell the parent that we just handled a mail
print $pipe "CLASS:$class$eol";
!
# Note locally that file has been retrieved
$downloaded{$count} = 1;
--- 395,399 ----
# Tell the parent that we just handled a mail
print $pipe "CLASS:$class$eol";
!
# Note locally that file has been retrieved
$downloaded{$count} = 1;
|