spamassassin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r629040 - /spamassassin/trunk/masses/mass-check
Date Tue, 19 Feb 2008 09:14:42 GMT
Author: dos
Date: Tue Feb 19 01:14:39 2008
New Revision: 629040

URL: http://svn.apache.org/viewvc?rev=629040&view=rev
Log:
bug 5831: fix unlinking of temp DB files that was broken by r594689; remove "no strict's"
that should have been removed in r594689/r594691

Modified:
    spamassassin/trunk/masses/mass-check

Modified: spamassassin/trunk/masses/mass-check
URL: http://svn.apache.org/viewvc/spamassassin/trunk/masses/mass-check?rev=629040&r1=629039&r2=629040&view=diff
==============================================================================
--- spamassassin/trunk/masses/mass-check (original)
+++ spamassassin/trunk/masses/mass-check Tue Feb 19 01:14:39 2008
@@ -531,40 +531,31 @@
     my ($dbpath, $dbfd) = Mail::SpamAssassin::Util::secure_tmpfile();
     close $dbfd;
     unlink $dbpath;
-    push @cache_tmp_files, $dbpath;
+    push @cache_tmp_files, $dbpath.'.pag';
+    push @cache_tmp_files, $dbpath.'.dir';
 
-    {
-      no strict; # SDBM_File is optional, avoid strict subs warnings
-      tie %{$server_caches{'to_process'}}, "SDBM_File", $dbpath,
-        O_RDWR|O_CREAT, 0600 ||
-          die "Cannot tie hash to file $dbpath: $!";
-    }
+    tie %{$server_caches{'to_process'}}, "SDBM_File", $dbpath,
+      O_RDWR|O_CREAT, 0600 || die "Cannot tie hash to file $dbpath: $!";
 
     # get a temp file for the server DB of messages that are not cached anywhere
     ($dbpath, $dbfd) = Mail::SpamAssassin::Util::secure_tmpfile();
     close $dbfd;
     unlink $dbpath;
-    push @cache_tmp_files, $dbpath;
+    push @cache_tmp_files, $dbpath.'.pag';
+    push @cache_tmp_files, $dbpath.'.dir';
   
-    {
-      no strict; # SDBM_File is optional, avoid strict subs warnings
-      tie %{$server_caches{'not_cached'}}, "SDBM_File", $dbpath,
-        O_RDWR|O_CREAT, 0600 ||
-          die "Cannot tie hash to file $dbpath: $!";
-    }
+    tie %{$server_caches{'not_cached'}}, "SDBM_File", $dbpath,
+      O_RDWR|O_CREAT, 0600 || die "Cannot tie hash to file $dbpath: $!";
 
     # get a temp file for the server database of cache hit counts per message
     ($dbpath, $dbfd) = Mail::SpamAssassin::Util::secure_tmpfile();
     close $dbfd;
     unlink $dbpath;
-    push @cache_tmp_files, $dbpath;
+    push @cache_tmp_files, $dbpath.'.pag';
+    push @cache_tmp_files, $dbpath.'.dir';
 
-    {
-      no strict; # SDBM_File is optional, avoid strict subs warnings
-      tie %{$server_caches{'cache_count'}}, "SDBM_File", $dbpath,
-        O_RDWR|O_CREAT, 0600 ||
-          die "Cannot tie hash to file $dbpath: $!";
-    }
+    tie %{$server_caches{'cache_count'}}, "SDBM_File", $dbpath,
+      O_RDWR|O_CREAT, 0600 || die "Cannot tie hash to file $dbpath: $!";
 
     # dump the server's list of messages to process to the DB_HASHes
     while (my $msg = read_line($tmpfd)) {
@@ -1271,14 +1262,11 @@
             my ($dbpath, $dbfd) = Mail::SpamAssassin::Util::secure_tmpfile();
             close $dbfd;
             unlink $dbpath;
-            push @cache_tmp_files, $dbpath;
+            push @cache_tmp_files, $dbpath.'.pag';
+            push @cache_tmp_files, $dbpath.'.dir';
 
-            {
-              no strict; # SDBM_File is optional, avoid strict subs warnings
-              tie %{$client_caches{$headers->{'client-id'}}}, "SDBM_File", $dbpath,
-                O_RDWR|O_CREAT, 0600 ||
-                  die "Cannot tie hash to file $dbpath: $!\n";
-            }
+            tie %{$client_caches{$headers->{'client-id'}}}, "SDBM_File", $dbpath,
+              O_RDWR|O_CREAT, 0600 || die "Cannot tie hash to file $dbpath: $!\n";
 
             # dump the client's list of cached message paths to the DB_HASH
             my $client_cache = 0;



Mime
View raw message