You can subscribe to this list here.
| 2003 |
Jan
|
Feb
(160) |
Mar
(119) |
Apr
(111) |
May
(118) |
Jun
(101) |
Jul
(304) |
Aug
(113) |
Sep
(140) |
Oct
(137) |
Nov
(87) |
Dec
(122) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(78) |
Feb
(125) |
Mar
(131) |
Apr
(59) |
May
(121) |
Jun
(166) |
Jul
(150) |
Aug
(137) |
Sep
(73) |
Oct
(58) |
Nov
(27) |
Dec
(60) |
| 2005 |
Jan
(131) |
Feb
(84) |
Mar
(36) |
Apr
(8) |
May
(28) |
Jun
(20) |
Jul
(10) |
Aug
(72) |
Sep
(76) |
Oct
(34) |
Nov
(3) |
Dec
(29) |
| 2006 |
Jan
(13) |
Feb
(92) |
Mar
(7) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(4) |
Aug
(17) |
Sep
(5) |
Oct
(2) |
Nov
(8) |
Dec
(12) |
| 2007 |
Jan
(28) |
Feb
(15) |
Mar
|
Apr
|
May
(8) |
Jun
(4) |
Jul
(5) |
Aug
(8) |
Sep
(20) |
Oct
(38) |
Nov
(65) |
Dec
(92) |
| 2008 |
Jan
(21) |
Feb
(56) |
Mar
(27) |
Apr
(174) |
May
(25) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <jgr...@us...> - 2003-10-27 21:57:08
|
Update of /cvsroot/popfile/windows/languages In directory sc8-pr-cvs1:/tmp/cvs-serv29772 Modified Files: PortugueseBR-pfi.nsh Log Message: Updated language file Index: PortugueseBR-pfi.nsh =================================================================== RCS file: /cvsroot/popfile/windows/languages/PortugueseBR-pfi.nsh,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** PortugueseBR-pfi.nsh 4 Oct 2003 00:38:49 -0000 1.11 --- PortugueseBR-pfi.nsh 27 Oct 2003 21:56:27 -0000 1.12 *************** *** 121,125 **** !insertmacro PFI_LANG_STRING PFI_LANG_INST_PROG_PERL "Instalando os arquivos mínimos do Perl..." !insertmacro PFI_LANG_STRING PFI_LANG_INST_PROG_SHORT "Criando os atalhos do POPFile..." ! !insertmacro PFI_LANG_STRING PFI_LANG_INST_PROG_FFCBACK "Making corpus backup. This may take a few seconds..." !insertmacro PFI_LANG_STRING PFI_LANG_INST_PROG_SKINS "Instalando os arquivos de skins do POPFile..." !insertmacro PFI_LANG_STRING PFI_LANG_INST_PROG_LANGS "Instalando os arquivos de línguas do POPFile..." --- 121,125 ---- !insertmacro PFI_LANG_STRING PFI_LANG_INST_PROG_PERL "Instalando os arquivos mínimos do Perl..." !insertmacro PFI_LANG_STRING PFI_LANG_INST_PROG_SHORT "Criando os atalhos do POPFile..." ! !insertmacro PFI_LANG_STRING PFI_LANG_INST_PROG_FFCBACK "Fazendo o backup do corpus. Isto pode levar alguns segundos..." !insertmacro PFI_LANG_STRING PFI_LANG_INST_PROG_SKINS "Instalando os arquivos de skins do POPFile..." !insertmacro PFI_LANG_STRING PFI_LANG_INST_PROG_LANGS "Instalando os arquivos de línguas do POPFile..." |
|
From: <jgr...@us...> - 2003-10-27 21:22:06
|
Update of /cvsroot/popfile/windows/languages
In directory sc8-pr-cvs1:/tmp/cvs-serv21875
Added Files:
check.pl
Log Message:
Added check.pl script to help people localizing the installer; thanks to Junya for the code
--- NEW FILE: check.pl ---
#----------------------------------------------------------------------------
#
# check.pl
#
# Checks language files for inconsistency against the English-pfi.nsh
# file. Run check.pl and it will report missing, extraneous, not translated
# entries in all the *-pfi.nsh files present
#
# Copyright (c) 2003 John Graham-Cumming
#
# This file is part of POPFile
#
# POPFile is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# POPFile is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with POPFile; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#----------------------------------------------------------------------------
# The English-pfi.nsh file is loaded into this hash since it is
# the definitive version and is used to check against the other
# languages
my %english;
# ---------------------------------------------------------------------------------------------
#
# load_language - Load a language file into a hash
#
# $file The msg file to load
# $hash Reference to hash to store the values in
#
# ---------------------------------------------------------------------------------------------
sub load_language
{
my ( $file, $hash ) = @_;
if ( open LANG, "<$file" ) {
while ( <LANG> ) {
next if ( /^[ \t]*#/ );
if ( /^!insertmacro PFI_LANG_STRING ([^ \t]+)[ \t]+"(.+)"/ ) {
my $id = $1;
my $msg = $2;
$msg =~ s/[\r\n]//g;
$$hash{$id} = $msg;
}
}
close LANG;
}
}
# ---------------------------------------------------------------------------------------------
#
# check_language - Verify that a language file is consistent with the English version
#
# $file The language to check against English
#
# ---------------------------------------------------------------------------------------------
sub check_language
{
my ( $file ) = @_;
print "\nChecking language $file...\n";
my %lang;
load_language( $file, \%lang );
# First check to see if there are any entries in the English hash
# that are not present in the lang hash
foreach my $key (sort keys %english) {
if ( !defined( $lang{$key} ) ) {
print "MISSING: $key\n";
}
}
# Now check for keys that we don't need any more
foreach my $key (sort keys %lang) {
if ( !defined( $english{$key} ) ) {
print "DEPRECATED: $key\n";
}
}
# Now check for keys that are not translated
if ($file ne 'English-pfi.nsh') {
foreach my $key (sort keys %lang) {
if ( $lang{$key} eq $english{$key} ) {
print "NOT TRANSLATED: $key\n";
}
}
}
}
# MAIN
load_language( 'English-pfi.nsh', \%english );
my @nshs;
if ( $ARGV[0] ne '' ) {
@nshs = ( $ARGV[0] );
} else {
@nshs = glob "*-pfi.nsh";
}
foreach $nsh (@nshs) {
check_language( $nsh );
}
|
|
From: <xue...@us...> - 2003-10-22 17:03:36
|
Update of /cvsroot/popfile/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv18252
Modified Files:
shutdown.ico stop_popfile.nsi
Log Message:
Use nicer icon (from Patch 820926)
Index: shutdown.ico
===================================================================
RCS file: /cvsroot/popfile/windows/shutdown.ico,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
Binary files /tmp/cvsJ0kAxy and /tmp/cvsKnRqPW differ
Index: stop_popfile.nsi
===================================================================
RCS file: /cvsroot/popfile/windows/stop_popfile.nsi,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** stop_popfile.nsi 19 Sep 2003 11:34:45 -0000 1.4
--- stop_popfile.nsi 22 Oct 2003 14:15:32 -0000 1.5
***************
*** 73,77 ****
Caption "POPFile Silent Shutdown Utility"
! !define VERSION "0.4.2" ; see 'VIProductVersion' comment below for format details
; Specify EXE filename and icon for the 'installer'
--- 73,77 ----
Caption "POPFile Silent Shutdown Utility"
! !define VERSION "0.4.3" ; see 'VIProductVersion' comment below for format details
; Specify EXE filename and icon for the 'installer'
|
|
From: <xue...@us...> - 2003-10-22 14:55:55
|
Update of /cvsroot/popfile/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv18649
Modified Files:
installer.nsi
Log Message:
Hide the debug log but make it easy to display it if necessary (this adds an extra 'Next' click)
Index: installer.nsi
===================================================================
RCS file: /cvsroot/popfile/windows/installer.nsi,v
retrieving revision 1.140
retrieving revision 1.141
diff -C2 -d -r1.140 -r1.141
*** installer.nsi 16 Oct 2003 13:41:09 -0000 1.140
--- installer.nsi 22 Oct 2003 14:18:21 -0000 1.141
***************
*** 286,292 ****
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION "ShowReadMe"
! ; Debug aid: Display the log during the installation and wait for user to click 'Next' at end
- ShowInstDetails show
!define MUI_FINISHPAGE_NOAUTOCLOSE
--- 286,291 ----
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION "ShowReadMe"
! ; Debug aid: Hide the installation log but let user display it (using "Show details" button)
!define MUI_FINISHPAGE_NOAUTOCLOSE
|
|
From: <jgr...@us...> - 2003-10-21 00:32:23
|
Update of /cvsroot/popfile/engine/UI
In directory sc8-pr-cvs1:/tmp/cvs-serv4483/UI
Modified Files:
HTML.pm
Log Message:
Put the link tags inside the head of the page
Index: HTML.pm
===================================================================
RCS file: /cvsroot/popfile/engine/UI/HTML.pm,v
retrieving revision 1.218
retrieving revision 1.219
diff -C2 -d -r1.218 -r1.219
*** HTML.pm 20 Oct 2003 12:53:50 -0000 1.218
--- HTML.pm 20 Oct 2003 21:38:42 -0000 1.219
***************
*** 634,638 ****
$result .= "<meta http-equiv=\"Cache-Control\" content=\"no-cache\">\n";
! $result .= "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=$self->{language__}{LanguageCharset}\">\n</head>\n";
$result .= "<link rel=\"icon\" href=\"favicon.ico\">\n";
--- 634,638 ----
$result .= "<meta http-equiv=\"Cache-Control\" content=\"no-cache\">\n";
! $result .= "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=$self->{language__}{LanguageCharset}\">\n";
$result .= "<link rel=\"icon\" href=\"favicon.ico\">\n";
***************
*** 655,658 ****
--- 655,660 ----
$result .= "href=\"skins/" . $self->config_( 'skin' ) . ".css\" title=\"" . $self->config_( 'skin' ) . "\">\n";
}
+
+ $result .= "</head>\n";
return $result;
|
|
From: <jgr...@us...> - 2003-10-20 22:47:04
|
Update of /cvsroot/popfile/engine/Classifier
In directory sc8-pr-cvs1:/tmp/cvs-serv6597/Classifier
Modified Files:
MailParse.pm
Log Message:
Preserve CRLF inside quoted-printable and add a test
Index: MailParse.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/MailParse.pm,v
retrieving revision 1.169
retrieving revision 1.170
diff -C2 -d -r1.169 -r1.170
*** MailParse.pm 14 Oct 2003 16:15:26 -0000 1.169
--- MailParse.pm 20 Oct 2003 21:49:11 -0000 1.170
***************
*** 1401,1405 ****
if ( $self->{encoding__} =~ /quoted\-printable/i ) {
$line = decode_qp( $line );
! $line =~ s/[\r\n]+$//g;
$self->{ut__} = decode_qp( $self->{ut__} ) if ( $self->{color__} );
}
--- 1401,1405 ----
if ( $self->{encoding__} =~ /quoted\-printable/i ) {
$line = decode_qp( $line );
! $line =~ s/[\r\n]+$/ /g;
$self->{ut__} = decode_qp( $self->{ut__} ) if ( $self->{color__} );
}
|
|
From: <jgr...@us...> - 2003-10-20 22:00:54
|
Update of /cvsroot/popfile/engine/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv8972/tests
Modified Files:
TestMailParse.tst
Log Message:
Better QP test for CRLF handling
Index: TestMailParse.tst
===================================================================
RCS file: /cvsroot/popfile/engine/tests/TestMailParse.tst,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** TestMailParse.tst 20 Oct 2003 21:49:11 -0000 1.22
--- TestMailParse.tst 20 Oct 2003 22:00:37 -0000 1.23
***************
*** 296,298 ****
--- 296,305 ----
test_assert_equal( $cl->{words__}{'html:imgheight41'}, 1 );
+ open FILE, ">temp.tmp";
+ print FILE "From: John\nContent-Type: multipart/alternative;\n\tboundary=\"247C6_.5B._4\"\n\n--247C6_.5B._4\nContent-Type: text/html;\nContent-Transfer-Encoding: quoted-printable\n\n<img width=3D42\nheight=3D41>\n\n--247C6_.5B._4--\n";
+ close FILE;
+ $cl->parse_file( 'temp.tmp' );
+ test_assert_equal( $cl->{words__}{'html:imgwidth42'}, 1 );
+ test_assert_equal( $cl->{words__}{'html:imgheight41'}, 1 );
+
$b->stop();
|
|
From: <jgr...@us...> - 2003-10-20 21:53:35
|
Update of /cvsroot/popfile/engine/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv6597/tests
Modified Files:
TestMailParse.tst
Log Message:
Preserve CRLF inside quoted-printable and add a test
Index: TestMailParse.tst
===================================================================
RCS file: /cvsroot/popfile/engine/tests/TestMailParse.tst,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** TestMailParse.tst 13 Oct 2003 20:23:41 -0000 1.21
--- TestMailParse.tst 20 Oct 2003 21:49:11 -0000 1.22
***************
*** 287,289 ****
--- 287,298 ----
test_assert_equal( $cl->splitline( '=3Chtml=3E', '' ), '=3Chtml=3E' );
+ # Test the CRLF is preserved in QP encoding
+
+ open FILE, ">temp.tmp";
+ print FILE "From: John\n\n<img width=42\nheight=41>\n";
+ close FILE;
+ $cl->parse_file( 'temp.tmp' );
+ test_assert_equal( $cl->{words__}{'html:imgwidth42'}, 1 );
+ test_assert_equal( $cl->{words__}{'html:imgheight41'}, 1 );
+
$b->stop();
|
|
From: <jgr...@us...> - 2003-10-20 15:57:26
|
Update of /cvsroot/popfile/engine/POPFile
In directory sc8-pr-cvs1:/tmp/cvs-serv22773/POPFile
Modified Files:
Configuration.pm
Log Message:
Create test suites for the utility scripts:
insert.pl
bayes.pl
pipe.pl
insert.pl:
Added code to detect errors (file does not exist,
bucket does not exist), output error messages and
return an error code.
Make sure that all POPFile modules are cleaned up
when done.
bayes.pl:
Added code to detect errors (file does not exist),
output error messages and return an error code.
Make sure that all POPFile modules are cleaned up
when done.
pipe.pl:
Make sure that all POPFile modules are cleaned up
when done.
Pass in \n as the end of line character so that the
STDOUT output will have the right end of line character
for the platform pipe.pl is being used on. If this
is not done then POPFile will use the standard network
line ending: \r\n.
Classifer/Bayes.pm:
Add reference to IO::Handle since we need it for
flush.
Add an optional $crlf option to classify_and_modify so
that it can be used with non-network streams that require
an EOL different from \r\n.
If classify_and_modify is told not to save the file in
the history then there's no need to save the file even
temporarily because the streaming parsing added in v0.20.0
doesn't need a copy of the message on disk.
write_line__ might now be passed an undef file handle so
don't try to write to it.
If we are not saving the classification to the history
then don't add the XPL header (or the equivalent link
in a quarantined message) since it wont work.
POPFile/Configuration.pm:
Add code to determine whether there has been a
configuration change. This is done to prevent the
configuration being saved when nothing has changed.
This is particularly needed by the scripts which wont
change the configuration and shouldn't have the code
of a save.
tests/TestInsertScript.tst:
Test suite for insert.pl.
tests/TestBayesScript.tst:
Test suite for bayes.pl.
tests/TestPipeScript.tst:
Test suite for pipe.pl.
Index: Configuration.pm
===================================================================
RCS file: /cvsroot/popfile/engine/POPFile/Configuration.pm,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** Configuration.pm 20 Aug 2003 03:09:03 -0000 1.27
--- Configuration.pm 20 Oct 2003 12:53:50 -0000 1.28
***************
*** 65,68 ****
--- 65,72 ----
$self->{pid_check__} = time;
+ # Used to tell whether we need to save the configuration
+
+ $self->{save_needed__} = 0;
+
bless $self, $type;
***************
*** 104,119 ****
--- 108,128 ----
# The default timeout in seconds for POP3 commands
+
$self->global_config_( 'timeout', 60 );
# Subject modification (global setting is on)
+
$self->global_config_( 'subject', 1 );
# Adding the X-Text-Classification on
+
$self->global_config_( 'xtc', 1 );
# Adding the X-POPFile-Link is on
+
$self->global_config_( 'xpl', 1 );
# The default location for the message files
+
$self->global_config_( 'msgdir', 'messages/' );
***************
*** 175,180 ****
}
-
-
# ---------------------------------------------------------------------------------------------
#
--- 184,187 ----
***************
*** 193,197 ****
}
-
# ---------------------------------------------------------------------------------------------
#
--- 200,203 ----
***************
*** 450,453 ****
--- 456,461 ----
close CONFIG;
}
+
+ $self->{save_needed__} = 0;
}
***************
*** 463,467 ****
--- 471,481 ----
my ( $self ) = @_;
+ if ( $self->{save_needed__} == 0 ) {
+ return;
+ }
+
if ( open CONFIG, ">popfile.cfg" ) {
+ $self->{save_needed__} = 0;
+
foreach my $key (sort keys %{$self->{configuration_parameters__}}) {
print CONFIG "$key $self->{configuration_parameters__}{$key}\n";
***************
*** 489,492 ****
--- 503,507 ----
if ( defined( $value ) ) {
+ $self->{save_needed__} = 1;
$self->{configuration_parameters__}{$name} = $value;
}
|
|
From: <jgr...@us...> - 2003-10-20 15:05:21
|
Update of /cvsroot/popfile/engine/UI
In directory sc8-pr-cvs1:/tmp/cvs-serv22773/UI
Modified Files:
HTML.pm
Log Message:
Create test suites for the utility scripts:
insert.pl
bayes.pl
pipe.pl
insert.pl:
Added code to detect errors (file does not exist,
bucket does not exist), output error messages and
return an error code.
Make sure that all POPFile modules are cleaned up
when done.
bayes.pl:
Added code to detect errors (file does not exist),
output error messages and return an error code.
Make sure that all POPFile modules are cleaned up
when done.
pipe.pl:
Make sure that all POPFile modules are cleaned up
when done.
Pass in \n as the end of line character so that the
STDOUT output will have the right end of line character
for the platform pipe.pl is being used on. If this
is not done then POPFile will use the standard network
line ending: \r\n.
Classifer/Bayes.pm:
Add reference to IO::Handle since we need it for
flush.
Add an optional $crlf option to classify_and_modify so
that it can be used with non-network streams that require
an EOL different from \r\n.
If classify_and_modify is told not to save the file in
the history then there's no need to save the file even
temporarily because the streaming parsing added in v0.20.0
doesn't need a copy of the message on disk.
write_line__ might now be passed an undef file handle so
don't try to write to it.
If we are not saving the classification to the history
then don't add the XPL header (or the equivalent link
in a quarantined message) since it wont work.
POPFile/Configuration.pm:
Add code to determine whether there has been a
configuration change. This is done to prevent the
configuration being saved when nothing has changed.
This is particularly needed by the scripts which wont
change the configuration and shouldn't have the code
of a save.
tests/TestInsertScript.tst:
Test suite for insert.pl.
tests/TestBayesScript.tst:
Test suite for bayes.pl.
tests/TestPipeScript.tst:
Test suite for pipe.pl.
Index: HTML.pm
===================================================================
RCS file: /cvsroot/popfile/engine/UI/HTML.pm,v
retrieving revision 1.217
retrieving revision 1.218
diff -C2 -d -r1.217 -r1.218
*** HTML.pm 15 Oct 2003 16:53:14 -0000 1.217
--- HTML.pm 20 Oct 2003 12:53:50 -0000 1.218
***************
*** 133,136 ****
--- 133,140 ----
$self->{last_login__} = '';
+ # Used to determine whehter the cache needs to be saved
+
+ $self->{save_cache__} = 0;
+
# Must call bless before attempting to call any methods
***************
*** 2487,2490 ****
--- 2491,2498 ----
my ( $self ) = @_;
+ if ( $self->{save_cache__} == 0 ) {
+ return;
+ }
+
open CACHE, '>' . $self->global_config_( 'msgdir' ) . 'history_cache';
print CACHE "___HISTORY__ __ VERSION__ 1\n";
***************
*** 3766,3769 ****
--- 3774,3778 ----
$added = 1;
delete $self->{history_pre_cache__}{$file};
+ $self->{save_cache__} = 1;
}
|
|
From: <jgr...@us...> - 2003-10-20 13:06:31
|
Update of /cvsroot/popfile/engine
In directory sc8-pr-cvs1:/tmp/cvs-serv22773
Modified Files:
bayes.pl insert.pl pipe.pl
Log Message:
Create test suites for the utility scripts:
insert.pl
bayes.pl
pipe.pl
insert.pl:
Added code to detect errors (file does not exist,
bucket does not exist), output error messages and
return an error code.
Make sure that all POPFile modules are cleaned up
when done.
bayes.pl:
Added code to detect errors (file does not exist),
output error messages and return an error code.
Make sure that all POPFile modules are cleaned up
when done.
pipe.pl:
Make sure that all POPFile modules are cleaned up
when done.
Pass in \n as the end of line character so that the
STDOUT output will have the right end of line character
for the platform pipe.pl is being used on. If this
is not done then POPFile will use the standard network
line ending: \r\n.
Classifer/Bayes.pm:
Add reference to IO::Handle since we need it for
flush.
Add an optional $crlf option to classify_and_modify so
that it can be used with non-network streams that require
an EOL different from \r\n.
If classify_and_modify is told not to save the file in
the history then there's no need to save the file even
temporarily because the streaming parsing added in v0.20.0
doesn't need a copy of the message on disk.
write_line__ might now be passed an undef file handle so
don't try to write to it.
If we are not saving the classification to the history
then don't add the XPL header (or the equivalent link
in a quarantined message) since it wont work.
POPFile/Configuration.pm:
Add code to determine whether there has been a
configuration change. This is done to prevent the
configuration being saved when nothing has changed.
This is particularly needed by the scripts which wont
change the configuration and shouldn't have the code
of a save.
tests/TestInsertScript.tst:
Test suite for insert.pl.
tests/TestBayesScript.tst:
Test suite for bayes.pl.
tests/TestPipeScript.tst:
Test suite for pipe.pl.
Index: bayes.pl
===================================================================
RCS file: /cvsroot/popfile/engine/bayes.pl,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** bayes.pl 13 Oct 2003 20:23:40 -0000 1.24
--- bayes.pl 20 Oct 2003 12:53:50 -0000 1.25
***************
*** 32,36 ****
# main
! if ( $#ARGV == 0 ) {
my $c = new POPFile::Configuration;
my $mq = new POPFile::MQ;
--- 32,38 ----
# main
! my $code = 0;
!
! if ( $#ARGV >= 0 ) {
my $c = new POPFile::Configuration;
my $mq = new POPFile::MQ;
***************
*** 62,78 ****
$b->start();
! my @files = glob $ARGV[0];
foreach my $file (@files) {
! print "$file is '" . $b->classify($file) . "'\n";
}
! foreach my $word (sort keys %{$b->{parser__}->{words__}}) {
! print "$word $b->{parser__}->{words__}{$word}\n";
}
}
else
{
! print "bayes.pl - output the score that a message is in each bucket\n\n";
print "Usage: bayes.pl <messages>\n";
print " <messages> Filename of message(s) to classify\n";
}
--- 64,105 ----
$b->start();
! my @files;
!
! if ($^O =~ /linux/) {
! @files = @ARGV[0 .. $#ARGV];
! } else {
! @files = map { glob } @ARGV[0 .. $#ARGV];
! }
!
foreach my $file (@files) {
! if ( !(-e $file) ) {
! print STDERR "Error: File `$file' does not exist, classification aborted.\n";
! $code = 1;
! last;
! }
}
! if ( $code == 0 ) {
! foreach my $file (@files) {
! print "`$file' is `" . $b->classify( $file ) . "'\n";
! }
!
! foreach my $word (sort keys %{$b->{parser__}->{words__}}) {
! print "$word $b->{parser__}->{words__}{$word}\n";
! }
}
+
+ $b->stop();
+ $l->stop();
+ $mq->stop();
+ $c->stop();
}
else
{
! print "bayes.pl - output the classification of a message\n\n";
print "Usage: bayes.pl <messages>\n";
print " <messages> Filename of message(s) to classify\n";
+ $code = 1;
}
+
+ exit $code;
Index: insert.pl
===================================================================
RCS file: /cvsroot/popfile/engine/insert.pl,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** insert.pl 9 Oct 2003 18:22:11 -0000 1.24
--- insert.pl 20 Oct 2003 12:53:50 -0000 1.25
***************
*** 30,33 ****
--- 30,35 ----
use POPFile::Logger;
+ my $code = 0;
+
if ( $#ARGV > 0 ) {
my $c = new POPFile::Configuration;
***************
*** 65,76 ****
@files = @ARGV[1 .. $#ARGV];
} else {
! @files = map { glob } @ARGV[1 .. $#ARGV];
}
! if ( !$b->add_messages_to_bucket( $ARGV[0], @files ) ) {
! print "Bucket $ARGV[0] does not exist\n";
! } else {
! print "Added ", $#files+1, " files to $ARGV[0]\n";
}
} else {
print "insert.pl - insert mail messages into a specific bucket\n\n";
--- 67,97 ----
@files = @ARGV[1 .. $#ARGV];
} else {
! @files = map { glob } @ARGV[1 .. $#ARGV];
}
! # Check for the existence of each file first because the API
! # call we use does not care if a file is missing
!
! foreach my $file (@files) {
! if ( !(-e $file) ) {
! print STDERR "Error: File `$file' does not exist, insert aborted.\n";
! $code = 1;
! last;
! }
}
+
+ if ( $code == 0 ) {
+ if ( !$b->add_messages_to_bucket( $ARGV[0], @files ) ) {
+ print STDERR "Error: Bucket `$ARGV[0]' does not exist, insert aborted.\n";
+ $code = 1;
+ } else {
+ print "Added ", $#files+1, " files to `$ARGV[0]'\n";
+ }
+ }
+
+ $b->stop();
+ $l->stop();
+ $mq->stop();
+ $c->stop();
} else {
print "insert.pl - insert mail messages into a specific bucket\n\n";
***************
*** 78,81 ****
--- 99,105 ----
print " <bucket> The name of the bucket\n";
print " <messages> Filename of message(s) to insert\n";
+ $code = 1;
}
+
+ exit $code;
Index: pipe.pl
===================================================================
RCS file: /cvsroot/popfile/engine/pipe.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** pipe.pl 6 Jul 2003 01:11:47 -0000 1.2
--- pipe.pl 20 Oct 2003 12:53:50 -0000 1.3
***************
*** 17,22 ****
# main
! if ( $#ARGV == -1 )
! {
my $c = new POPFile::Configuration;
my $mq = new POPFile::MQ;
--- 17,21 ----
# main
! if ( $#ARGV == -1 ) {
my $c = new POPFile::Configuration;
my $mq = new POPFile::MQ;
***************
*** 54,62 ****
$b->start();
! $b->classify_and_modify(\*STDIN, \*STDOUT, 0, 0, 1, '', 1) . "'\n";
! }
! else
! {
print "pipe.pl - reads a message on STDIN, classifies it, outputs the modified version on STDOUT\n\n";
print "Usage: pipe.pl\n";
}
--- 53,69 ----
$b->start();
! $b->classify_and_modify(\*STDIN, \*STDOUT, 0, 0, 1, '', 1, "\n") . "'\n";
!
! $b->stop();
! $l->stop();
! $mq->stop();
! $c->stop();
! $u->stop();
!
! exit 0;
! } else {
print "pipe.pl - reads a message on STDIN, classifies it, outputs the modified version on STDOUT\n\n";
print "Usage: pipe.pl\n";
+
+ exit 1;
}
|
|
From: <jgr...@us...> - 2003-10-20 13:06:27
|
Update of /cvsroot/popfile/engine/Classifier
In directory sc8-pr-cvs1:/tmp/cvs-serv22773/Classifier
Modified Files:
Bayes.pm
Log Message:
Create test suites for the utility scripts:
insert.pl
bayes.pl
pipe.pl
insert.pl:
Added code to detect errors (file does not exist,
bucket does not exist), output error messages and
return an error code.
Make sure that all POPFile modules are cleaned up
when done.
bayes.pl:
Added code to detect errors (file does not exist),
output error messages and return an error code.
Make sure that all POPFile modules are cleaned up
when done.
pipe.pl:
Make sure that all POPFile modules are cleaned up
when done.
Pass in \n as the end of line character so that the
STDOUT output will have the right end of line character
for the platform pipe.pl is being used on. If this
is not done then POPFile will use the standard network
line ending: \r\n.
Classifer/Bayes.pm:
Add reference to IO::Handle since we need it for
flush.
Add an optional $crlf option to classify_and_modify so
that it can be used with non-network streams that require
an EOL different from \r\n.
If classify_and_modify is told not to save the file in
the history then there's no need to save the file even
temporarily because the streaming parsing added in v0.20.0
doesn't need a copy of the message on disk.
write_line__ might now be passed an undef file handle so
don't try to write to it.
If we are not saving the classification to the history
then don't add the XPL header (or the equivalent link
in a quarantined message) since it wont work.
POPFile/Configuration.pm:
Add code to determine whether there has been a
configuration change. This is done to prevent the
configuration being saved when nothing has changed.
This is particularly needed by the scripts which wont
change the configuration and shouldn't have the code
of a save.
tests/TestInsertScript.tst:
Test suite for insert.pl.
tests/TestBayesScript.tst:
Test suite for bayes.pl.
tests/TestPipeScript.tst:
Test suite for pipe.pl.
Index: Bayes.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/Bayes.pm,v
retrieving revision 1.213
retrieving revision 1.214
diff -C2 -d -r1.213 -r1.214
*** Bayes.pm 17 Oct 2003 06:12:03 -0000 1.213
--- Bayes.pm 20 Oct 2003 12:53:50 -0000 1.214
***************
*** 34,37 ****
--- 34,38 ----
use Classifier::MailParse;
use Classifier::WordMangle;
+ use IO::Handle;
# This is used to get the hostname of the current machine
***************
*** 1357,1361 ****
my ( $self, $file, $line, $class ) = @_;
! print $file $line;
if ( $class eq '' ) {
--- 1358,1362 ----
my ( $self, $file, $line, $class ) = @_;
! print $file $line if defined( $file );
if ( $class eq '' ) {
***************
*** 1379,1382 ****
--- 1380,1387 ----
# $class - if we already know the classification
# $echo - 1 to echo to the client, 0 to supress, defaults to 1
+ # $crlf - The sequence to use at the end of a line in the output, normally
+ # this is left undefined and this method uses $eol (the normal network end
+ # of line), but if this method is being used with real files you may wish
+ # to pass in \n instead
#
# Returns a classification if it worked and the name of the file where the message
***************
*** 1388,1394 ****
sub classify_and_modify
{
! my ( $self, $mail, $client, $dcount, $mcount, $nosave, $class, $echo ) = @_;
! $echo = 1 unless (defined $echo);
my $msg_subject = ''; # The message subject
--- 1393,1400 ----
sub classify_and_modify
{
! my ( $self, $mail, $client, $dcount, $mcount, $nosave, $class, $echo, $crlf ) = @_;
! $echo = 1 unless (defined $echo);
! $crlf = $eol unless (defined $crlf);
my $msg_subject = ''; # The message subject
***************
*** 1432,1436 ****
# get class file errors
! open TEMP, ">$temp_file";
while ( <$mail> ) {
--- 1438,1442 ----
# get class file errors
! open TEMP, ">$temp_file" unless $nosave;
while ( <$mail> ) {
***************
*** 1468,1472 ****
if ( !( $line =~ /^(\r\n|\r|\n)$/i ) ) {
$message_size += length $line;
! $self->write_line__( \*TEMP, $fileline, $class );
# If there is no echoing occuring, it doesn't matter what we do to these
--- 1474,1478 ----
if ( !( $line =~ /^(\r\n|\r|\n)$/i ) ) {
$message_size += length $line;
! $self->write_line__( $nosave?undef:\*TEMP, $fileline, $class );
# If there is no echoing occuring, it doesn't matter what we do to these
***************
*** 1497,1502 ****
}
} else {
! $self->write_line__( \*TEMP, "\n", $class );
! $message_size += length $eol;
$getting_headers = 0;
}
--- 1503,1508 ----
}
} else {
! $self->write_line__( $nosave?undef:\*TEMP, "\n", $class );
! $message_size += length $crlf;
$getting_headers = 0;
}
***************
*** 1504,1513 ****
$message_size += length $line;
$msg_body .= $line;
! $self->write_line__( \*TEMP, $fileline, $class );
}
# Check to see if too much time has passed and we need to keep the mail client happy
if ( time > ( $last_timeout + 2 ) ) {
! print $client "X-POPFile-TimeoutPrevention: $timeout_count$eol" if ( $echo );
$timeout_count += 1;
$last_timeout = time;
--- 1510,1519 ----
$message_size += length $line;
$msg_body .= $line;
! $self->write_line__( $nosave?undef:\*TEMP, $fileline, $class );
}
# Check to see if too much time has passed and we need to keep the mail client happy
if ( time > ( $last_timeout + 2 ) ) {
! print $client "X-POPFile-TimeoutPrevention: $timeout_count$crlf" if ( $echo );
$timeout_count += 1;
$last_timeout = time;
***************
*** 1517,1521 ****
}
! close TEMP;
# Parse Japanese mail message with Kakasi
--- 1523,1527 ----
}
! close TEMP unless $nosave;
# Parse Japanese mail message with Kakasi
***************
*** 1549,1556 ****
$msg_head_before .= 'Subject:' . $msg_subject;
! $msg_head_before .= $eol;
# Add the XTC header
! $msg_head_after .= "X-Text-Classification: $classification$eol" if ( ( $self->global_config_( 'xtc' ) ) && # PROFILE BLOCK START
( $self->{parameters__}{$classification}{quarantine} == 0 ) ); # PROFILE BLOCK STOP
--- 1555,1562 ----
$msg_head_before .= 'Subject:' . $msg_subject;
! $msg_head_before .= $crlf;
# Add the XTC header
! $msg_head_after .= "X-Text-Classification: $classification$crlf" if ( ( $self->global_config_( 'xtc' ) ) && # PROFILE BLOCK START
( $self->{parameters__}{$classification}{quarantine} == 0 ) ); # PROFILE BLOCK STOP
***************
*** 1560,1570 ****
$xpl .= "http://";
$xpl .= $self->module_config_( 'html', 'local' )?"127.0.0.1":$self->config_( 'hostname' );
! $xpl .= ":" . $self->module_config_( 'html', 'port' ) . "/jump_to_message?view=$nopath_temp_file$eol";
! if ( $self->global_config_( 'xpl' ) && ( $self->{parameters__}{$classification}{quarantine} == 0 ) ) {
$msg_head_after .= 'X-POPFile-Link: ' . $xpl;
}
! $msg_head_after .= $msg_head_q . "$eol";
# Echo the text of the message to the client
--- 1566,1576 ----
$xpl .= "http://";
$xpl .= $self->module_config_( 'html', 'local' )?"127.0.0.1":$self->config_( 'hostname' );
! $xpl .= ":" . $self->module_config_( 'html', 'port' ) . "/jump_to_message?view=$nopath_temp_file$crlf";
! if ( $self->global_config_( 'xpl' ) && ( $self->{parameters__}{$classification}{quarantine} == 0 ) && ( !$nosave ) ) {
$msg_head_after .= 'X-POPFile-Link: ' . $xpl;
}
! $msg_head_after .= $msg_head_q . "$crlf";
# Echo the text of the message to the client
***************
*** 1577,1583 ****
if ( ( $classification ne 'unclassified' ) && ( $classification ne 'unsure' ) ) {
if ( $self->{parameters__}{$classification}{quarantine} == 1 ) {
! print $client "From: " . $self->{parser__}->get_header( 'from' ) . "$eol";
! print $client "To: " . $self->{parser__}->get_header( 'to' ) . "$eol";
! print $client "Date: " . $self->{parser__}->get_header( 'date' ) . "$eol";
if ( $self->global_config_( 'subject' ) ) {
# Don't add the classification unless it is not present
--- 1583,1589 ----
if ( ( $classification ne 'unclassified' ) && ( $classification ne 'unsure' ) ) {
if ( $self->{parameters__}{$classification}{quarantine} == 1 ) {
! print $client "From: " . $self->{parser__}->get_header( 'from' ) . "$crlf";
! print $client "To: " . $self->{parser__}->get_header( 'to' ) . "$crlf";
! print $client "Date: " . $self->{parser__}->get_header( 'date' ) . "$crlf";
if ( $self->global_config_( 'subject' ) ) {
# Don't add the classification unless it is not present
***************
*** 1587,1606 ****
}
}
! print $client "Subject:$msg_subject$eol";
! print $client "X-Text-Classification: $classification$eol" if ( $self->global_config_( 'xtc' ) );
! print $client 'X-POPFile-Link: ' . $xpl if ( $self->global_config_( 'xpl' ) );
! print $client "MIME-Version: 1.0$eol";
! print $client "Content-Type: multipart/report; boundary=\"$nopath_temp_file\"$eol$eol--$nopath_temp_file$eol";
! print $client "Content-Type: text/plain$eol$eol";
! print $client "POPFile has quarantined a message. It is attached to this email.$eol$eol";
! print $client "Quarantined Message Detail$eol$eol";
! print $client "Original From: " . $self->{parser__}->get_header('from') . "$eol";
! print $client "Original To: " . $self->{parser__}->get_header('to') . "$eol";
! print $client "Original Subject: " . $self->{parser__}->get_header('subject') . "$eol";
! print $client "To examine the email open the attachment. To change this mail's classification go to $xpl$eol";
! print $client "The first 20 words found in the email are:$eol$eol";
print $client $self->{parser__}->first20();
! print $client "$eol--$nopath_temp_file$eol";
! print $client "Content-Type: message/rfc822$eol$eol";
}
}
--- 1593,1614 ----
}
}
! print $client "Subject:$msg_subject$crlf";
! print $client "X-Text-Classification: $classification$crlf" if ( $self->global_config_( 'xtc' ) );
! print $client 'X-POPFile-Link: ' . $xpl if ( $self->global_config_( 'xpl' ) && !$nosave );
! print $client "MIME-Version: 1.0$crlf";
! print $client "Content-Type: multipart/report; boundary=\"$nopath_temp_file\"$crlf$crlf--$nopath_temp_file$crlf";
! print $client "Content-Type: text/plain$crlf$crlf";
! print $client "POPFile has quarantined a message. It is attached to this email.$crlf$crlf";
! print $client "Quarantined Message Detail$crlf$crlf";
! print $client "Original From: " . $self->{parser__}->get_header('from') . "$crlf";
! print $client "Original To: " . $self->{parser__}->get_header('to') . "$crlf";
! print $client "Original Subject: " . $self->{parser__}->get_header('subject') . "$crlf";
! print $client "To examine the email open the attachment. ";
! print $client "To change this mail's classification go to $xpl" unless $nosave;
! print $client "$crlf";
! print $client "The first 20 words found in the email are:$crlf$crlf";
print $client $self->{parser__}->first20();
! print $client "$crlf--$nopath_temp_file$crlf";
! print $client "Content-Type: message/rfc822$crlf$crlf";
}
}
***************
*** 1615,1624 ****
if ( ( $classification ne 'unclassified' ) && ( $classification ne 'unsure' ) ) {
if ( ( $self->{parameters__}{$classification}{quarantine} == 1 ) && $echo ) {
! $before_dot = "$eol--$nopath_temp_file--$eol";
}
}
if ( !$got_full_body ) {
! $self->echo_to_dot_( $mail, $echo?$client:undef, '>>' . $temp_file, $before_dot );
} else {
print $client $before_dot if ( $before_dot ne '' );
--- 1623,1632 ----
if ( ( $classification ne 'unclassified' ) && ( $classification ne 'unsure' ) ) {
if ( ( $self->{parameters__}{$classification}{quarantine} == 1 ) && $echo ) {
! $before_dot = "$crlf--$nopath_temp_file--$crlf";
}
}
if ( !$got_full_body ) {
! $self->echo_to_dot_( $mail, $echo?$client:undef, $nosave?undef:'>>' . $temp_file, $before_dot );
} else {
print $client $before_dot if ( $before_dot ne '' );
***************
*** 1626,1635 ****
if ( $echo && $got_full_body ) {
! print $client "$eol.$eol";
}
! if ( $nosave ) {
! unlink( $temp_file );
! } else {
$self->history_write_class($class_file, undef, $classification, undef, ($self->{magnet_used__}?$self->{magnet_detail__}:undef));
--- 1634,1641 ----
if ( $echo && $got_full_body ) {
! print $client "$crlf.$crlf";
}
! if ( !$nosave ) {
$self->history_write_class($class_file, undef, $classification, undef, ($self->{magnet_used__}?$self->{magnet_detail__}:undef));
|
|
From: <jgr...@us...> - 2003-10-17 06:13:53
|
Update of /cvsroot/popfile/engine/tests/corpus.base/personal In directory sc8-pr-cvs1:/tmp/cvs-serv25504/tests/corpus.base/personal Modified Files: table Log Message: Entries in the table files with a count of 0 screw up the upgrade process, fix that and add a test case Index: table =================================================================== RCS file: /cvsroot/popfile/engine/tests/corpus.base/personal/table,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** table 27 Jul 2003 18:28:56 -0000 1.1 --- table 17 Oct 2003 06:12:04 -0000 1.2 *************** *** 3,6 **** --- 3,7 ---- bar 2 baz 100 + bom 0 |
|
From: <jgr...@us...> - 2003-10-17 06:13:51
|
Update of /cvsroot/popfile/engine/Classifier
In directory sc8-pr-cvs1:/tmp/cvs-serv25504/Classifier
Modified Files:
Bayes.pm
Log Message:
Entries in the table files with a count of 0 screw up the upgrade process, fix that and add a test case
Index: Bayes.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/Bayes.pm,v
retrieving revision 1.212
retrieving revision 1.213
diff -C2 -d -r1.212 -r1.213
*** Bayes.pm 16 Oct 2003 17:55:12 -0000 1.212
--- Bayes.pm 17 Oct 2003 06:12:03 -0000 1.213
***************
*** 714,718 ****
if ( /^([^\s]+) (\d+)$/ ) {
! $self->set_value_( $bucket, $1, $2 );
} else {
$self->log_( "Found entry in corpus for $bucket that looks wrong: \"$_\" (ignoring)" );
--- 714,720 ----
if ( /^([^\s]+) (\d+)$/ ) {
! if ( $2 != 0 ) {
! $self->set_value_( $bucket, $1, $2 );
! }
} else {
$self->log_( "Found entry in corpus for $bucket that looks wrong: \"$_\" (ignoring)" );
***************
*** 757,767 ****
if ( /^([^\s]+) (\d+)$/ ) {
! if ( $self->get_base_value_( $bucket, $1 ) != $2 ) {
! print "\nUpgrade error for word $1 in bucket $bucket.\nShutdown POPFile and rerun.\n";
! $upgrade_failed = 1;
! last;
}
- $bucket_total += $2;
- $bucket_unique += 1;
} else {
$self->log_( "Found entry in corpus for $bucket that looks wrong: \"$_\" (ignoring)" );
--- 759,771 ----
if ( /^([^\s]+) (\d+)$/ ) {
! if ( $2 != 0 ) {
! if ( $self->get_base_value_( $bucket, $1 ) != $2 ) {
! print "\nUpgrade error for word $1 in bucket $bucket.\nShutdown POPFile and rerun.\n";
! $upgrade_failed = 1;
! last;
! }
! $bucket_total += $2;
! $bucket_unique += 1;
}
} else {
$self->log_( "Found entry in corpus for $bucket that looks wrong: \"$_\" (ignoring)" );
|
|
From: <jgr...@us...> - 2003-10-16 17:59:44
|
Update of /cvsroot/popfile/engine In directory sc8-pr-cvs1:/tmp/cvs-serv31648 Modified Files: Makefile vars.mak Log Message: Make TICKD happen once per hour Index: Makefile =================================================================== RCS file: /cvsroot/popfile/engine/Makefile,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** Makefile 15 Oct 2003 17:08:14 -0000 1.26 --- Makefile 16 Oct 2003 17:59:38 -0000 1.27 *************** *** 99,104 **** # upload to SourceForge ! rc: RELEASE_FILES := $(POPFILE_ZIP) $(POPFILE_WINDOWS_ZIP) rc: chmod go+r $(RELEASE_FILES) ! scp -p $(RELEASE_ZIP) jgr...@po...:/home/groups/p/po/popfile/htdocs --- 99,105 ---- # upload to SourceForge ! rc: RELEASE_FILES := $(POPFILE_ZIP) ../windows/$(POPFILE_WINDOWS_ZIP) rc: chmod go+r $(RELEASE_FILES) ! scp -p $(RELEASE_FILES) jgr...@po...:/home/groups/p/po/popfile/htdocs ! Index: vars.mak =================================================================== RCS file: /cvsroot/popfile/engine/vars.mak,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** vars.mak 11 Sep 2003 23:04:59 -0000 1.2 --- vars.mak 16 Oct 2003 17:59:38 -0000 1.3 *************** *** 7,10 **** --- 7,12 ---- export POPFILE_VERSION=0.20.0 + POPFILE_ZIP := popfile-$(POPFILE_VERSION)$(RC).zip + POPFILE_WINDOWS_ZIP := popfile-$(POPFILE_VERSION)$(RC)-windows.zip |
|
From: <jgr...@us...> - 2003-10-16 17:59:44
|
Update of /cvsroot/popfile/engine/POPFile
In directory sc8-pr-cvs1:/tmp/cvs-serv31648/POPFile
Modified Files:
Logger.pm MQ.pm
Log Message:
Make TICKD happen once per hour
Index: Logger.pm
===================================================================
RCS file: /cvsroot/popfile/engine/POPFile/Logger.pm,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** Logger.pm 15 Oct 2003 16:53:14 -0000 1.23
--- Logger.pm 16 Oct 2003 17:59:38 -0000 1.24
***************
*** 121,129 ****
$self->calculate_today__();
! # We send out a TICKD message every 6 hours so that other modules
# can do clean up tasks that need to be done regularly but not
# often
! if ( time > ( $self->{last_tickd__} + 6 * 60 * 60 ) ) {
$self->mq_post_( 'TICKD', '', '' );
$self->{last_tickd__} = time;
--- 121,129 ----
$self->calculate_today__();
! # We send out a TICKD message every hour so that other modules
# can do clean up tasks that need to be done regularly but not
# often
! if ( time > ( $self->{last_tickd__} + 60 * 60 ) ) {
$self->mq_post_( 'TICKD', '', '' );
$self->{last_tickd__} = time;
Index: MQ.pm
===================================================================
RCS file: /cvsroot/popfile/engine/POPFile/MQ.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** MQ.pm 31 Jul 2003 16:32:21 -0000 1.6
--- MQ.pm 16 Oct 2003 17:59:38 -0000 1.7
***************
*** 31,35 ****
# object registering (comes from any component)
#
! # TICKD Occurs when a day has passed since the last TICKD (this
# is generated by the POPFile::Logger module)
#
--- 31,35 ----
# object registering (comes from any component)
#
! # TICKD Occurs when an hour has passed since the last TICKD (this
# is generated by the POPFile::Logger module)
#
|
|
From: <jgr...@us...> - 2003-10-16 17:55:18
|
Update of /cvsroot/popfile/engine/Classifier
In directory sc8-pr-cvs1:/tmp/cvs-serv30610/Classifier
Modified Files:
Bayes.pm
Log Message:
Remove debugging statement
Index: Bayes.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/Bayes.pm,v
retrieving revision 1.211
retrieving revision 1.212
diff -C2 -d -r1.211 -r1.212
*** Bayes.pm 14 Oct 2003 16:18:25 -0000 1.211
--- Bayes.pm 16 Oct 2003 17:55:12 -0000 1.212
***************
*** 2451,2455 ****
my $temp_file = $self->global_config_( 'msgdir' ) . "kakasi$dcount" . "=$mcount.msg";
- print $temp_file;
# Split Japanese email body into words using Kakasi Wakachigaki
--- 2451,2454 ----
|
|
From: <xue...@us...> - 2003-10-16 14:30:03
|
Update of /cvsroot/popfile/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv15250
Modified Files:
installer.nsi
Log Message:
Shutdown debug messages added immediately before the files get installed. Hopefully these will show where the problem lies?
Index: installer.nsi
===================================================================
RCS file: /cvsroot/popfile/windows/installer.nsi,v
retrieving revision 1.139
retrieving revision 1.140
diff -C2 -d -r1.139 -r1.140
*** installer.nsi 15 Oct 2003 20:40:12 -0000 1.139
--- installer.nsi 16 Oct 2003 13:41:09 -0000 1.140
***************
*** 286,292 ****
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION "ShowReadMe"
! ; Debug aid: Allow log file checking (by clicking "Show Details" button on the "Install" page)
! # !define MUI_FINISHPAGE_NOAUTOCLOSE
;-----------------------------------------
--- 286,293 ----
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION "ShowReadMe"
! ; Debug aid: Display the log during the installation and wait for user to click 'Next' at end
! ShowInstDetails show
! !define MUI_FINISHPAGE_NOAUTOCLOSE
;-----------------------------------------
***************
*** 850,854 ****
; Remove redundant links (used by earlier versions of POPFile)
!
Delete "$SMSTARTUP\Run POPFile in background.lnk"
Delete "$SMPROGRAMS\${MUI_PRODUCT}\Run POPFile in background.lnk"
--- 851,855 ----
; Remove redundant links (used by earlier versions of POPFile)
!
Delete "$SMSTARTUP\Run POPFile in background.lnk"
Delete "$SMPROGRAMS\${MUI_PRODUCT}\Run POPFile in background.lnk"
***************
*** 1221,1224 ****
--- 1222,1227 ----
; Earlier versions of POPFile (up to and including 0.19.1) may be using wperl.exe or perl.exe.
+ DetailPrint "Checking $INSTDIR\popfileb.exe"
+
Push "$INSTDIR\popfileb.exe"
Call CheckIfLocked
***************
*** 1226,1229 ****
--- 1229,1234 ----
StrCmp ${L_EXE} "" 0 attempt_shutdown
+ DetailPrint "Checking $INSTDIR\popfileib.exe"
+
Push "$INSTDIR\popfileib.exe"
Call CheckIfLocked
***************
*** 1231,1234 ****
--- 1236,1241 ----
StrCmp ${L_EXE} "" 0 attempt_shutdown
+ DetailPrint "Checking $INSTDIR\popfilef.exe"
+
Push "$INSTDIR\popfilef.exe"
Call CheckIfLocked
***************
*** 1236,1239 ****
--- 1243,1248 ----
StrCmp ${L_EXE} "" 0 attempt_shutdown
+ DetailPrint "Checking $INSTDIR\popfileif.exe"
+
Push "$INSTDIR\popfileif.exe"
Call CheckIfLocked
***************
*** 1241,1244 ****
--- 1250,1255 ----
StrCmp ${L_EXE} "" 0 attempt_shutdown
+ DetailPrint "Checking $INSTDIR\wperl.exe"
+
Push "$INSTDIR\wperl.exe"
Call CheckIfLocked
***************
*** 1246,1249 ****
--- 1257,1262 ----
StrCmp ${L_EXE} "" 0 attempt_shutdown
+ DetailPrint "Checking $INSTDIR\perl.exe"
+
Push "$INSTDIR\perl.exe"
Call CheckIfLocked
***************
*** 1260,1264 ****
StrCmp ${L_OLD_GUI} "" try_other_port
! DetailPrint "$(PFI_LANG_INST_LOG_1) ${L_OLD_GUI}"
NSISdl::download_quiet http://127.0.0.1:${L_OLD_GUI}/shutdown "$PLUGINSDIR\shutdown.htm"
Pop ${L_RESULT}
--- 1273,1277 ----
StrCmp ${L_OLD_GUI} "" try_other_port
! DetailPrint "$(PFI_LANG_INST_LOG_1) ${L_OLD_GUI} [old style port]"
NSISdl::download_quiet http://127.0.0.1:${L_OLD_GUI}/shutdown "$PLUGINSDIR\shutdown.htm"
Pop ${L_RESULT}
***************
*** 1271,1281 ****
StrCmp ${L_NEW_GUI} "" check_exe
! DetailPrint "$(PFI_LANG_INST_LOG_1) ${L_NEW_GUI}"
NSISdl::download_quiet http://127.0.0.1:${L_NEW_GUI}/shutdown "$PLUGINSDIR\shutdown.htm"
Pop ${L_RESULT} ; Ignore the result
check_exe:
Push ${L_EXE}
Call WaitUntilUnlocked
exit_now:
--- 1284,1357 ----
StrCmp ${L_NEW_GUI} "" check_exe
! DetailPrint "$(PFI_LANG_INST_LOG_1) ${L_NEW_GUI} [new style port]"
NSISdl::download_quiet http://127.0.0.1:${L_NEW_GUI}/shutdown "$PLUGINSDIR\shutdown.htm"
Pop ${L_RESULT} ; Ignore the result
check_exe:
+ DetailPrint "Waiting for '${L_EXE}' to unlock after NSISdl request..."
+ DetailPrint "Please be patient, this may take more than 30 seconds"
+ Push ${L_EXE}
+ Call WaitUntilUnlocked
+ DetailPrint "Checking if '${L_EXE}' is still locked after NSISdl request..."
+ Push ${L_EXE}
+ Call CheckIfLocked
+ Pop ${L_EXE}
+ StrCmp ${L_EXE} "" unlocked_exit
+
+ StrCmp ${L_OLD_GUI} "" try_new_style
+
+ DetailPrint "Trying browser request for ${L_OLD_GUI} [old style port]"
+ ClearErrors
+ ExecShell "open" "http://127.0.0.1:${L_OLD_GUI}/shutdown"
+ IfErrors 0 old_ok
+ DetailPrint "ExecShell error detected"
+
+ old_ok:
+ DetailPrint "Waiting for 5 seconds..."
+ Sleep 5000
+ BringToFront
+ DetailPrint "Waiting for '${L_EXE}' to unlock after browser request..."
+ DetailPrint "Please be patient, this may take more than 30 seconds"
Push ${L_EXE}
Call WaitUntilUnlocked
+ DetailPrint "Checking if '${L_EXE}' is still locked after browser request..."
+ Push ${L_EXE}
+ Call CheckIfLocked
+ Pop ${L_EXE}
+ StrCmp ${L_EXE} "" unlocked_exit
+
+ try_new_style:
+ StrCmp ${L_NEW_GUI} "" manual_shutdown_required
+ DetailPrint "Trying browser request for ${L_NEW_GUI} [new style port]"
+ ClearErrors
+ ExecShell "open" "http://127.0.0.1:${L_NEW_GUI}/shutdown"
+ IfErrors 0 new_ok
+ DetailPrint "ExecShell error detected"
+
+ new_ok:
+ DetailPrint "Waiting for 5 seconds..."
+ Sleep 5000
+ BringToFront
+ DetailPrint "Waiting for '${L_EXE}' to unlock after browser request..."
+ DetailPrint "Please be patient, this may take more than 30 seconds"
+ Push ${L_EXE}
+ Call WaitUntilUnlocked
+ DetailPrint "Checking if '${L_EXE}' is still locked after browser request..."
+ Push ${L_EXE}
+ Call CheckIfLocked
+ Pop ${L_EXE}
+ StrCmp ${L_EXE} "" unlocked_exit
+
+ manual_shutdown_required:
+ DetailPrint "Unable to shutdown automatically - manual intervention requested"
+ MessageBox MB_OK|MB_TOPMOST "Unable to shutdown POPFile automatically.\
+ $\r$\n$\r$\n\
+ Please shutdown POPFile manually now.\
+ $\r$\n$\r$\n\
+ When POPFile has been shutdown, click 'OK' to continue."
+ Goto exit_now
+
+ unlocked_exit:
+ DetailPrint "File is now unlocked"
exit_now:
***************
*** 2240,2243 ****
--- 2316,2320 ----
StrCmp ${L_TEMP} "console" exit_without_banner
StrCmp ${L_TEMP} "no" lastaction_console
+ StrCmp ${L_TEMP} "" lastaction_console
StrCpy ${L_EXE} "$INSTDIR\popfile${L_TRAY}b.exe"
***************
*** 2251,2254 ****
--- 2328,2332 ----
StrCmp ${L_TEMP} "background" exit_without_banner
StrCmp ${L_TEMP} "no" lastaction_background
+ StrCmp ${L_TEMP} "" lastaction_background
StrCpy ${L_EXE} "$INSTDIR\popfile${L_TRAY}f.exe"
***************
*** 2280,2284 ****
Click 'OK' when the 'POPFile Engine v0.20.0 running' message appears."
Goto exit_without_banner
!
continue:
--- 2358,2362 ----
Click 'OK' when the 'POPFile Engine v0.20.0 running' message appears."
Goto exit_without_banner
!
continue:
|
|
From: <xue...@us...> - 2003-10-15 20:41:49
|
Update of /cvsroot/popfile/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv7832
Modified Files:
installer.nsi
Log Message:
Try starting popfile.exe directly instead of via the shortcut. Display message if launch error detected.
Index: installer.nsi
===================================================================
RCS file: /cvsroot/popfile/windows/installer.nsi,v
retrieving revision 1.138
retrieving revision 1.139
diff -C2 -d -r1.138 -r1.139
*** installer.nsi 15 Oct 2003 09:12:28 -0000 1.138
--- installer.nsi 15 Oct 2003 20:40:12 -0000 1.139
***************
*** 2269,2273 ****
Push ${L_CONSOLE}
Call SetConsoleMode
! ExecShell "open" "$SMPROGRAMS\${MUI_PRODUCT}\Run POPFile.lnk"
; Wait until POPFile is ready to display the UI (may take a second or so)
--- 2269,2285 ----
Push ${L_CONSOLE}
Call SetConsoleMode
! SetOutPath $INSTDIR
! ClearErrors
! Exec '"$INSTDIR\popfile.exe"'
! IfErrors 0 continue
! Banner::destroy
! MessageBox MB_OK|MB_TOPMOST "An error occurred when the installer tried to start POPFile.\
! $\r$\n$\r$\n\
! Please use 'Start -> Programs -> POPFile -> Run POPFile' now.\
! $\r$\n$\r$\n\
! Click 'OK' when the 'POPFile Engine v0.20.0 running' message appears."
! Goto exit_without_banner
!
! continue:
; Wait until POPFile is ready to display the UI (may take a second or so)
***************
*** 2370,2374 ****
Function RunUI
! ExecShell "open" "$SMPROGRAMS\${MUI_PRODUCT}\POPFile User Interface.url"
FunctionEnd
--- 2382,2386 ----
Function RunUI
! ExecShell "open" '"$SMPROGRAMS\${MUI_PRODUCT}\POPFile User Interface.url"'
FunctionEnd
|
|
From: <jgr...@us...> - 2003-10-15 17:08:20
|
Update of /cvsroot/popfile/engine In directory sc8-pr-cvs1:/tmp/cvs-serv1145/engine Modified Files: Makefile Log Message: Simplify the rc target Index: Makefile =================================================================== RCS file: /cvsroot/popfile/engine/Makefile,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Makefile 15 Oct 2003 17:07:28 -0000 1.25 --- Makefile 15 Oct 2003 17:08:14 -0000 1.26 *************** *** 99,103 **** # upload to SourceForge rc: ! chmod go+r $(POPFILE_ZIP) $(POPFILE_WINDOWS_ZIP) ! scp -p $(CP_ZIP) $(WINDOWS_ZIP) jgr...@po...:/home/groups/p/po/popfile/htdocs --- 99,104 ---- # upload to SourceForge + rc: RELEASE_FILES := $(POPFILE_ZIP) $(POPFILE_WINDOWS_ZIP) rc: ! chmod go+r $(RELEASE_FILES) ! scp -p $(RELEASE_ZIP) jgr...@po...:/home/groups/p/po/popfile/htdocs |
|
From: <jgr...@us...> - 2003-10-15 17:07:39
|
Update of /cvsroot/popfile/windows In directory sc8-pr-cvs1:/tmp/cvs-serv1035/windows Modified Files: Makefile Log Message: Simplify the rc target Index: Makefile =================================================================== RCS file: /cvsroot/popfile/windows/Makefile,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Makefile 30 Sep 2003 14:44:12 -0000 1.13 --- Makefile 15 Oct 2003 17:07:28 -0000 1.14 *************** *** 21,25 **** include ..\engine\vars.mak - POPFILE_WINDOWS_ZIP := popfile-$(POPFILE_VERSION)-windows.zip BUILD_ZIP=../engine/wzzip -P $(POPFILE_WINDOWS_ZIP) -a $^ --- 21,24 ---- |
|
From: <jgr...@us...> - 2003-10-15 17:07:36
|
Update of /cvsroot/popfile/engine In directory sc8-pr-cvs1:/tmp/cvs-serv1035/engine Modified Files: Makefile Log Message: Simplify the rc target Index: Makefile =================================================================== RCS file: /cvsroot/popfile/engine/Makefile,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** Makefile 15 Oct 2003 17:05:12 -0000 1.24 --- Makefile 15 Oct 2003 17:07:28 -0000 1.25 *************** *** 77,81 **** # build a ZIPped up package of POPFile - POPFILE_ZIP := popfile-$(POPFILE_VERSION).zip BUILD_ZIP=wzzip -P $(POPFILE_ZIP) -a $^ xplat: $(POPFILE_ZIP) --- 77,80 ---- *************** *** 100,111 **** # upload to SourceForge - rc: CP_ZIP = popfile-$(POPFILE_VERSION)$(RC).zip - rc: WINDOWS_ZIP = ../windows/popfile-$(POPFILE_VERSION)$(RC)-windows.zip - rc: ! rm -f $(CP_ZIP) ! rm -f $(WINDOWS_ZIP) ! mv $(POPFILE_ZIP) $(CP_ZIP) ! mv ../windows/popfile-$(POPFILE_VERSION)-windows.zip $(WINDOWS_ZIP) ! chmod go+r $(CP_ZIP) $(WINDOWS_ZIP) scp -p $(CP_ZIP) $(WINDOWS_ZIP) jgr...@po...:/home/groups/p/po/popfile/htdocs --- 99,103 ---- # upload to SourceForge rc: ! chmod go+r $(POPFILE_ZIP) $(POPFILE_WINDOWS_ZIP) scp -p $(CP_ZIP) $(WINDOWS_ZIP) jgr...@po...:/home/groups/p/po/popfile/htdocs |
|
From: <jgr...@us...> - 2003-10-15 17:05:17
|
Update of /cvsroot/popfile/engine In directory sc8-pr-cvs1:/tmp/cvs-serv667 Modified Files: Makefile Log Message: Added rc target used to make it easy for me to make and ship release candidates Index: Makefile =================================================================== RCS file: /cvsroot/popfile/engine/Makefile,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Makefile 1 Oct 2003 14:34:28 -0000 1.23 --- Makefile 15 Oct 2003 17:05:12 -0000 1.24 *************** *** 23,26 **** --- 23,29 ---- @echo " ZIP files for Windows and cross-platform" @echo " version" + @echo "rc - After doing package moves the ZIP files to be RC zip files" + @echo " The RC number is set with the RC parameter so do" + @echo " make rc RC=RC6 for example." # test runs the POPFile unit test suite *************** *** 92,94 **** # installer ! package: $(POPFILE_ZIP) windows \ No newline at end of file --- 95,111 ---- # installer ! package: $(POPFILE_ZIP) windows ! ! # Used to convert the ZIP files to RC ZIP files and ! # upload to SourceForge ! ! rc: CP_ZIP = popfile-$(POPFILE_VERSION)$(RC).zip ! rc: WINDOWS_ZIP = ../windows/popfile-$(POPFILE_VERSION)$(RC)-windows.zip ! ! rc: ! rm -f $(CP_ZIP) ! rm -f $(WINDOWS_ZIP) ! mv $(POPFILE_ZIP) $(CP_ZIP) ! mv ../windows/popfile-$(POPFILE_VERSION)-windows.zip $(WINDOWS_ZIP) ! chmod go+r $(CP_ZIP) $(WINDOWS_ZIP) ! scp -p $(CP_ZIP) $(WINDOWS_ZIP) jgr...@po...:/home/groups/p/po/popfile/htdocs |
|
From: <jgr...@us...> - 2003-10-15 16:53:21
|
Update of /cvsroot/popfile/engine/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv31121/tests
Modified Files:
TestLogger.tst TestModule.tst
Log Message:
Make TICKD messages get sent every 6 hours; update test suite and use TICKD to delete log files
Index: TestLogger.tst
===================================================================
RCS file: /cvsroot/popfile/engine/tests/TestLogger.tst,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TestLogger.tst 8 Sep 2003 18:03:58 -0000 1.5
--- TestLogger.tst 15 Oct 2003 16:53:15 -0000 1.6
***************
*** 116,120 ****
# Check that we get a tick when a day passes
! $l->{today__} -= 86400;
$l->service();
--- 116,120 ----
# Check that we get a tick when a day passes
! $l->{last_tickd__} -= 86400;
$l->service();
***************
*** 127,134 ****
--- 127,136 ----
`date --set='2 days'`;
$l->service();
+ $mq->service();
my $exists = ( -e $file );
test_assert( $exists, "checking that debug file was deleted" );
`date --set='1 day'`;
$l->service();
+ $mq->service();
$exists = ( -e $file );
test_assert( !$exists, "checking that debug file was deleted" );
Index: TestModule.tst
===================================================================
RCS file: /cvsroot/popfile/engine/tests/TestModule.tst,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** TestModule.tst 13 Oct 2003 20:23:41 -0000 1.6
--- TestModule.tst 15 Oct 2003 16:53:15 -0000 1.7
***************
*** 88,91 ****
--- 88,92 ----
my $l = new POPFile::Logger;
+ $l->mq( $mq );
$m->logger( $l );
$l->configuration( $c );
|
|
From: <jgr...@us...> - 2003-10-15 16:53:21
|
Update of /cvsroot/popfile/engine/POPFile
In directory sc8-pr-cvs1:/tmp/cvs-serv31121/POPFile
Modified Files:
Logger.pm
Log Message:
Make TICKD messages get sent every 6 hours; update test suite and use TICKD to delete log files
Index: Logger.pm
===================================================================
RCS file: /cvsroot/popfile/engine/POPFile/Logger.pm,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** Logger.pm 31 Jul 2003 16:32:21 -0000 1.22
--- Logger.pm 15 Oct 2003 16:53:14 -0000 1.23
***************
*** 42,46 ****
# Class new() function
#----------------------------------------------------------------------------
! sub new
{
my $proto = shift;
--- 42,46 ----
# Class new() function
#----------------------------------------------------------------------------
! sub new
{
my $proto = shift;
***************
*** 75,84 ****
# Start with debugging to file
$self->global_config_( 'debug', 1 );
# The default location for log files
$self->config_( 'logdir', './' );
! calculate_today__( $self );
return 1;
--- 75,89 ----
# Start with debugging to file
+
$self->global_config_( 'debug', 1 );
# The default location for log files
+
$self->config_( 'logdir', './' );
! $self->{last_tickd__} = time;
!
! $self->mq_register_( 'TICKD', $self );
! $self->calculate_today__();
return 1;
***************
*** 87,133 ****
# ---------------------------------------------------------------------------------------------
#
! # service
#
#
# ---------------------------------------------------------------------------------------------
! sub service
{
! my ( $self ) = @_;
! remove_debug_files( $self );
! return 1;
}
# ---------------------------------------------------------------------------------------------
#
! # remove_debug_files
! #
! # Removes popfile log files that are older than 3 days
#
# ---------------------------------------------------------------------------------------------
! sub remove_debug_files
{
my ( $self ) = @_;
! my $yesterday = defined($self->{today__})?$self->{today__}:0;
! calculate_today__( $self );
!
! if ( $self->{today__} > $yesterday ) {
! # Inform other modules that a day has passed
$self->mq_post_( 'TICKD', '', '' );
!
! my @debug_files = glob( $self->config_( 'logdir' ) . 'popfile*.log' );
!
! foreach my $debug_file (@debug_files) {
! # Extract the epoch information from the popfile log file name
! if ( $debug_file =~ /popfile([0-9]+)\.log/ ) {
! # If older than now - 3 days then delete
! unlink($debug_file) if ( $1 < (time - 3 * $seconds_per_day) );
! }
! }
}
}
--- 92,134 ----
# ---------------------------------------------------------------------------------------------
#
! # deliver
#
+ # Called by the message queue to deliver a message
+ #
+ # There is no return value from this method
#
# ---------------------------------------------------------------------------------------------
! sub deliver
{
! my ( $self, $type, $message, $parameter ) = @_;
! # If a day has passed then clean up log files
! if ( $type eq 'TICKD' ) {
! $self->remove_debug_files();
! }
}
# ---------------------------------------------------------------------------------------------
#
! # service
#
# ---------------------------------------------------------------------------------------------
! sub service
{
my ( $self ) = @_;
! $self->calculate_today__();
! # We send out a TICKD message every 6 hours so that other modules
! # can do clean up tasks that need to be done regularly but not
! # often
+ if ( time > ( $self->{last_tickd__} + 6 * 60 * 60 ) ) {
$self->mq_post_( 'TICKD', '', '' );
! $self->{last_tickd__} = time;
}
+
+ return 1;
}
***************
*** 148,151 ****
--- 149,174 ----
# ---------------------------------------------------------------------------------------------
#
+ # remove_debug_files
+ #
+ # Removes popfile log files that are older than 3 days
+ #
+ # ---------------------------------------------------------------------------------------------
+ sub remove_debug_files
+ {
+ my ( $self ) = @_;
+
+ my @debug_files = glob( $self->config_( 'logdir' ) . 'popfile*.log' );
+
+ foreach my $debug_file (@debug_files) {
+ # Extract the epoch information from the popfile log file name
+ if ( $debug_file =~ /popfile([0-9]+)\.log/ ) {
+ # If older than now - 3 days then delete
+ unlink($debug_file) if ( $1 < (time - 3 * $seconds_per_day) );
+ }
+ }
+ }
+
+ # ---------------------------------------------------------------------------------------------
+ #
# debug
#
***************
*** 177,184 ****
if ( $self->global_config_( 'debug' ) & 1 ) {
! open DEBUG, ">>$self->{debug_filename__}";
! binmode DEBUG;
! print DEBUG $msg;
! close DEBUG;
}
--- 200,210 ----
if ( $self->global_config_( 'debug' ) & 1 ) {
! if ( open DEBUG, ">>$self->{debug_filename__}" ) {
! binmode DEBUG;
! print DEBUG $msg;
! close DEBUG;
! } else {
! print "Can't write to log file $self->{debug_filename__}\n";
! }
}
|