diff options
| author | fukachan <fukachan> | 2005-12-18 12:24:09 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2005-12-18 12:24:09 +0000 |
| commit | 698b4bb44f866b874485833813d338fd6d0716a7 (patch) | |
| tree | 38e3f838eeed94c85d445d9d9f83cd25eafe5609 /fml/lib | |
| parent | e3eb9f042aa19c7ce96863e23063ccbfd9cfe56c (diff) | |
| download | fml8-698b4bb44f866b874485833813d338fd6d0716a7.tar.gz fml8-698b4bb44f866b874485833813d338fd6d0716a7.tar.bz2 fml8-698b4bb44f866b874485833813d338fd6d0716a7.zip | |
workaround: unlock() call lock object via IO::Adapter if saved object
undefined.
bug fix loop check functions to check enabler variable definition.
Diffstat (limited to 'fml/lib')
| -rw-r--r-- | fml/lib/FML/Process/Kernel.pm | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/fml/lib/FML/Process/Kernel.pm b/fml/lib/FML/Process/Kernel.pm index c57047e6..5b3e2d61 100644 --- a/fml/lib/FML/Process/Kernel.pm +++ b/fml/lib/FML/Process/Kernel.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Kernel.pm,v 1.268 2005/08/19 12:17:09 fukachan Exp $ +# $FML: Kernel.pm,v 1.269 2005/11/30 23:30:38 fukachan Exp $ # package FML::Process::Kernel; @@ -392,7 +392,8 @@ sub unlock ($channel, $lock_file) = $curproc->_lock_init($channel); my $pcb = $curproc->pcb(); - my $io = $pcb->get('lock', $channel); + my $map = sprintf("file:%s", $lock_file); + my $io = $pcb->get('lock', $channel) || new IO::Adapter $map; if (defined $io) { my $r = $io->unlock( { file => $lock_file } ); @@ -411,7 +412,7 @@ sub unlock } } else { - $curproc->logerror("object undefined, cannot unlock"); + $curproc->logerror("object undefined, cannot unlock channel=$channel"); croak("Error: object undefined, cannot unlock"); } } @@ -647,16 +648,18 @@ sub simple_loop_check $config->get_as_array_ref( 'incoming_mail_header_loop_check_rules' ); my $match = 0; - RULE: - for my $rule (@$rules) { - if ($header->can($rule)) { - $match = $header->$rule($config) ? $rule : 0; - } - else { - $curproc->logwarn("header->${rule}() is undefined"); - } + if ($config->yes('use_incoming_mail_header_loop_check')) { + RULE: + for my $rule (@$rules) { + if ($header->can($rule)) { + $match = $header->$rule($config) ? $rule : 0; + } + else { + $curproc->logwarn("header->${rule}() is undefined"); + } - last RULE if $match; + last RULE if $match; + } } # This $match contains the first matched rule name (== reason). |
