summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process
diff options
context:
space:
mode:
authorfukachan <fukachan>2004-08-13 15:02:48 +0000
committerfukachan <fukachan>2004-08-13 15:02:48 +0000
commitf3dd33cfe5d500e45114ba6efd7cb0e6c51f2d24 (patch)
tree75fa20b9ecd6ef4776b2ff3961a8ffec4eab5c35 /fml/lib/FML/Process
parentb1bba02f89b28e52a15602ba9e2b4ad4bd8e1fe4 (diff)
downloadfml8-f3dd33cfe5d500e45114ba6efd7cb0e6c51f2d24.tar.gz
fml8-f3dd33cfe5d500e45114ba6efd7cb0e6c51f2d24.tar.bz2
fml8-f3dd33cfe5d500e45114ba6efd7cb0e6c51f2d24.zip
temporal failure when external filter process timeouts.
if external filter process timeouts, notify it to $curproc layer, and distribution process exit(75) for temporal failure. implement filter_state_{set,get}_tempfail_request().
Diffstat (limited to 'fml/lib/FML/Process')
-rw-r--r--fml/lib/FML/Process/Distribute.pm7
-rw-r--r--fml/lib/FML/Process/State.pm30
2 files changed, 35 insertions, 2 deletions
diff --git a/fml/lib/FML/Process/Distribute.pm b/fml/lib/FML/Process/Distribute.pm
index 5e0d0504..16996298 100644
--- a/fml/lib/FML/Process/Distribute.pm
+++ b/fml/lib/FML/Process/Distribute.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2000,2001,2002,2003,2004 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Distribute.pm,v 1.153 2004/06/30 15:03:19 tmu Exp $
+# $FML: Distribute.pm,v 1.154 2004/07/23 15:59:09 fukachan Exp $
#
package FML::Process::Distribute;
@@ -133,6 +133,11 @@ sub verify_request
$curproc->_check_filter();
}
+ if ($curproc->filter_state_get_tempfail_request()) {
+ $curproc->exit_as_tempfail(); # XXX LONG JUMP!
+ # NOT REACH HERE
+ }
+
$eval = $config->get_hook( 'distribute_verify_request_end_hook' );
$eval .= $config->get_hook( 'article_post_verify_request_end_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
diff --git a/fml/lib/FML/Process/State.pm b/fml/lib/FML/Process/State.pm
index a4e12dd9..7e9d1e5e 100644
--- a/fml/lib/FML/Process/State.pm
+++ b/fml/lib/FML/Process/State.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: State.pm,v 1.13 2004/07/11 15:43:39 fukachan Exp $
+# $FML: State.pm,v 1.14 2004/07/23 15:59:10 fukachan Exp $
#
package FML::Process::State;
@@ -577,6 +577,34 @@ sub filter_state_virus_checker_get_error
}
+# Descriptions: we need to exit as EX_TEMPFAIL.
+# Arguments: OBJ($curproc)
+# Side Effects: update pcb.
+# Return Value: none
+sub filter_state_set_tempfail_request
+{
+ my ($curproc) = @_;
+ my $category = "exit_tempfail";
+ my $pcb = $curproc->pcb();
+
+ $pcb->set("filter_state", $category, 1);
+}
+
+
+# Descriptions: check if we need to exit as EX_TEMPFAIL.
+# Arguments: OBJ($curproc)
+# Side Effects: none.
+# Return Value: NUM
+sub filter_state_get_tempfail_request
+{
+ my ($curproc) = @_;
+ my $category = "exit_tempfail";
+ my $pcb = $curproc->pcb();
+
+ return( $pcb->get("filter_state", $category) || 0 );
+}
+
+
=head1 SMTP STATE
=head2 smtp_server_state_set_error($mta)