|
From: <jgr...@us...> - 2003-08-01 00:50:58
|
Update of /cvsroot/popfile/engine/Proxy
In directory sc8-pr-cvs1:/tmp/cvs-serv25597/Proxy
Modified Files:
POP3.pm
Log Message:
Fix bug where after doing RETR x after TOP x we not return the file from cache because we weren't getting the filename write; also fixed bug where even if we did get from cache the XPL would be wrong; and if we did get from cache we'd drop out of the if and send the ETR again
Index: POP3.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Proxy/POP3.pm,v
retrieving revision 1.70
retrieving revision 1.71
diff -C2 -d -r1.70 -r1.71
*** POP3.pm 1 Aug 2003 00:36:26 -0000 1.70
--- POP3.pm 1 Aug 2003 00:50:54 -0000 1.71
***************
*** 393,397 ****
my $class;
! my $file = $self->{classifier__}->history_filename($download_count, $count);
my $short_file = $file;
--- 393,399 ----
my $class;
! # The 1 here indicates that we need the path to the history file
!
! my $file = $self->{classifier__}->history_filename($download_count, $count, undef, 1);
my $short_file = $file;
***************
*** 410,418 ****
# Give the client an +OK:
! print $client "+OK file data cached by POPFile$eol";
# Load the last classification
! my ( $reclassified, $bucket, $usedtobe, $magnet) = $self->{classifier__}->history_load_class($short_file);
if ($bucket ne 'unknown class') {
--- 412,420 ----
# Give the client an +OK:
! print $client "+OK " . ( -s $file ) . " bytes from POPFile cache$eol";
# Load the last classification
! my ( $reclassified, $bucket, $usedtobe, $magnet) = $self->{classifier__}->history_read_class($short_file);
if ($bucket ne 'unknown class') {
***************
*** 420,429 ****
# echo file, inserting known classification, without saving
! $class = $self->{classifier__}->classify_and_modify( \*RETRFILE, $client, $download_count, 0, 1, $bucket );
} else {
# If the class wasn't saved properly, classify from disk normally
! $class = $self->{classifier__}->classify_and_modify( \*RETRFILE, $client, $download_count, 0, 1, '' );
print $pipe "CLASS:$class$eol";
--- 422,431 ----
# echo file, inserting known classification, without saving
! $class = $self->{classifier__}->classify_and_modify( \*RETRFILE, $client, $download_count, $count, 1, $bucket );
} else {
# If the class wasn't saved properly, classify from disk normally
! $class = $self->{classifier__}->classify_and_modify( \*RETRFILE, $client, $download_count, $count, 1, '' );
print $pipe "CLASS:$class$eol";
***************
*** 454,460 ****
$self->flush_extra_( $mail, $client, 0 );
}
-
- next;
}
}
--- 456,462 ----
$self->flush_extra_( $mail, $client, 0 );
}
}
+
+ next;
}
|