Lines 82-96
Link Here
|
82 |
|
82 |
|
83 |
dbg("auto-whitelist: tie-ing to DB file of type $dbm_module $mod1 in $path"); |
83 |
dbg("auto-whitelist: tie-ing to DB file of type $dbm_module $mod1 in $path"); |
84 |
|
84 |
|
|
|
85 |
($self->{is_locked} && $dbm_module eq 'DB_File') and |
86 |
Mail::SpamAssassin::Util::avoid_db_file_locking_bug ($path); |
87 |
|
85 |
if (! tie %{ $self->{accum} }, $dbm_module, $path, $mod2, |
88 |
if (! tie %{ $self->{accum} }, $dbm_module, $path, $mod2, |
86 |
oct($main->{conf}->{auto_whitelist_file_mode}) ) { |
89 |
oct($main->{conf}->{auto_whitelist_file_mode}) ) |
87 |
my $err = $!; # might get overwritten later |
90 |
{ |
88 |
if ($self->{is_locked}) { |
91 |
my $err = $!; # might get overwritten later |
89 |
$self->{main}->{locker}->safe_unlock($self->{locked_file}); |
92 |
if ($self->{is_locked}) { |
90 |
$self->{is_locked} = 0; |
93 |
$self->{main}->{locker}->safe_unlock($self->{locked_file}); |
91 |
} |
94 |
$self->{is_locked} = 0; |
92 |
die "auto-whitelist: cannot open auto_whitelist_path $path: $err\n"; |
|
|
93 |
} |
95 |
} |
|
|
96 |
die "auto-whitelist: cannot open auto_whitelist_path $path: $err\n"; |
97 |
} |
94 |
} |
98 |
} |
95 |
|
99 |
|
96 |
bless ($self, $class); |
100 |
bless ($self, $class); |