diff options
| author | fukachan <fukachan> | 2006-04-03 03:16:48 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2006-04-03 03:16:48 +0000 |
| commit | 8eb2d2c52fa4ef2c73609058be568c07e8738914 (patch) | |
| tree | a3eaf1f38afdf08cf0c828c3580e612c650b8380 /fml/lib/Mail/Delivery/Queue.pm | |
| parent | 3434c6dda8281271d630a918925f1bfe30121920 (diff) | |
| download | fml8-8eb2d2c52fa4ef2c73609058be568c07e8738914.tar.gz fml8-8eb2d2c52fa4ef2c73609058be568c07e8738914.tar.bz2 fml8-8eb2d2c52fa4ef2c73609058be568c07e8738914.zip | |
ensure lock/unlock return value
Diffstat (limited to 'fml/lib/Mail/Delivery/Queue.pm')
| -rw-r--r-- | fml/lib/Mail/Delivery/Queue.pm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fml/lib/Mail/Delivery/Queue.pm b/fml/lib/Mail/Delivery/Queue.pm index 1cc22c4e..68e93796 100644 --- a/fml/lib/Mail/Delivery/Queue.pm +++ b/fml/lib/Mail/Delivery/Queue.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: Queue.pm,v 1.60 2006/04/01 08:07:49 fukachan Exp $ +# $FML: Queue.pm,v 1.61 2006/04/02 06:56:08 fukachan Exp $ # package Mail::Delivery::Queue; @@ -745,6 +745,8 @@ sub lock else { $self->_logerror("cannot lock: qid=$id"); } + + return 0; } @@ -757,13 +759,15 @@ sub unlock my ($self) = @_; my $id = $self->id(); - my $io = $self->{ _lock }->{ $id }; + my $io = $self->{ _lock }->{ $id } || undef; if (defined $io) { - $io->unlock(); + return $io->unlock(); } else { $self->_logerror("not locked: qid=$id"); } + + return 0; } |
