diff options
| author | fukachan <fukachan> | 2003-03-16 07:26:20 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2003-03-16 07:26:20 +0000 |
| commit | 65c05fbbc7c5d9e5ed3f59207ea2ce8ae50bdf7f (patch) | |
| tree | 8ef03af8c849588179f021da6ff190b1f2cd3a72 /fml/lib/FML/Process/Error.pm | |
| parent | d0f972422c290576a8c22fede6468d72f816e96b (diff) | |
| download | fml8-65c05fbbc7c5d9e5ed3f59207ea2ce8ae50bdf7f.tar.gz fml8-65c05fbbc7c5d9e5ed3f59207ea2ce8ae50bdf7f.tar.bz2 fml8-65c05fbbc7c5d9e5ed3f59207ea2ce8ae50bdf7f.zip | |
clean up lock on error cache.
move lock mechanism into only FML::Error module.
XXX lock channel name is changed but hard-coded yet now.
Diffstat (limited to 'fml/lib/FML/Process/Error.pm')
| -rw-r--r-- | fml/lib/FML/Process/Error.pm | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/fml/lib/FML/Process/Error.pm b/fml/lib/FML/Process/Error.pm index 8ef57ac8..59a23285 100644 --- a/fml/lib/FML/Process/Error.pm +++ b/fml/lib/FML/Process/Error.pm @@ -3,7 +3,7 @@ # Copyright (C) 2002,2003 Ken'ichi Fukamachi # All rights reserved. # -# $FML: Error.pm,v 1.27 2003/02/11 09:48:16 fukachan Exp $ +# $FML: Error.pm,v 1.28 2003/02/18 15:57:46 fukachan Exp $ # package FML::Process::Error; @@ -153,8 +153,8 @@ sub run $bouncer->analyze( $msg ); use FML::Error; - my $error_obj = new FML::Error $curproc; - my $errorcache = $error_obj->db_open(); + my $error = new FML::Error $curproc; + $error->db_open(); for my $address ( $bouncer->address_list ) { my $status = $bouncer->status( $address ); @@ -165,17 +165,17 @@ sub run Log("bounced: status=$status"); Log("bounced: reason=\"$reason\""); - $curproc->lock('errorcache'); - $errorcache->add({ + $error->add({ address => $address, status => $status, reason => $reason, }); - $curproc->unlock('errorcache'); $found++; } } + + $error->db_close(); }; LogError($@) if $@; @@ -206,11 +206,7 @@ sub _clean_up_bouncers eval q{ use FML::Error; my $error = new FML::Error $curproc; - - $curproc->lock('errorcache'); $error->analyze(); - $curproc->unlock('errorcache'); - $error->remove_bouncers(); }; LogError($@) if $@; |
