diff options
| author | fukachan <fukachan> | 2002-04-10 04:31:09 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-04-10 04:31:09 +0000 |
| commit | 8a7e4160b8c068ca1c59da9f5603bfa02f7513e4 (patch) | |
| tree | b6f4523ec8251f6bb60332d06633c06d444e1700 /fml/lib/FML/Process/Kernel.pm | |
| parent | e808d50da996d1f7fca80e879a677188ed3b58c9 (diff) | |
| download | fml8-8a7e4160b8c068ca1c59da9f5603bfa02f7513e4.tar.gz fml8-8a7e4160b8c068ca1c59da9f5603bfa02f7513e4.tar.bz2 fml8-8a7e4160b8c068ca1c59da9f5603bfa02f7513e4.zip | |
enable filtering.
implement access methods to control filtering.
o $curproc->refuse_further_processing()
o $curproc->is_refused()
Diffstat (limited to 'fml/lib/FML/Process/Kernel.pm')
| -rw-r--r-- | fml/lib/FML/Process/Kernel.pm | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/fml/lib/FML/Process/Kernel.pm b/fml/lib/FML/Process/Kernel.pm index 414e1306..b098dcf4 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.81 2002/03/17 06:24:31 fukachan Exp $ +# $FML: Kernel.pm,v 1.82 2002/03/31 12:11:26 fukachan Exp $ # package FML::Process::Kernel; @@ -368,6 +368,8 @@ sub simple_loop_check } if ($match) { + # we should stop this process ASAP. + $curproc->refuse_further_processing(); Log("mail loop detected for $match"); } } @@ -511,6 +513,38 @@ sub _check_resitrictions } +=head2 refuse_further_processing($reason) + +Set "we should refuse this processing now" flag. +We should stop this process as soon as possible. + +=head2 is_refused() + +We should stop this process as soon as possible due to something +invalid conditions by such as filtering. + +=cut + + +sub refuse_further_processing +{ + my ($curproc, $reason) = @_; + $curproc->{ __this_process_is_invalid } = 1; +} + + +sub is_refused +{ + my ($curproc, $reason) = @_; + + if (defined $curproc->{ __this_process_is_invalid }) { + return $curproc->{ __this_process_is_invalid }; + } + + return 0; +} + + =head1 MESSAGE HANDLING =head2 C<reply_message($msg)> |
