summaryrefslogtreecommitdiff
path: root/fml/lib
diff options
context:
space:
mode:
authorfukachan <fukachan>2004-05-18 08:49:19 +0000
committerfukachan <fukachan>2004-05-18 08:49:19 +0000
commit87eed399fc6ef4cd53cf0628b44faf3a43b922d0 (patch)
tree5cd2c029e7a7273171bb6589f80fee0341241bae /fml/lib
parent3eb6b30c877abdfe5cbc23d9b3c2c98de50e1e3b (diff)
downloadfml8-87eed399fc6ef4cd53cf0628b44faf3a43b922d0.tar.gz
fml8-87eed399fc6ef4cd53cf0628b44faf3a43b922d0.tar.bz2
fml8-87eed399fc6ef4cd53cf0628b44faf3a43b922d0.zip
implement set_article_id(), get_article_id(),
smtp_server_state_set_error() and smtp_server_state_get_error().
Diffstat (limited to 'fml/lib')
-rw-r--r--fml/lib/FML/Process/State.pm72
1 files changed, 68 insertions, 4 deletions
diff --git a/fml/lib/FML/Process/State.pm b/fml/lib/FML/Process/State.pm
index c8ba0bd2..7cb4f452 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.6 2004/04/17 11:37:56 fukachan Exp $
+# $FML: State.pm,v 1.7 2004/04/22 12:48:19 fukachan Exp $
#
package FML::Process::State;
@@ -67,7 +67,7 @@ sub get_current_process_ml_name
}
-=haed1 BASIC RESTRICTION STATES
+=head1 BASIC RESTRICTION STATES
CAUTION: restriction_state_*() is reset each command.
@@ -166,7 +166,38 @@ sub restriction_state_reply_reason
}
-=haed1 COMMAND PROCESSOER STATES
+=head1 ARTICLE STATES
+
+=cut
+
+
+# Descriptions: get the current article id on this process.
+# Arguments: OBJ($curproc) NUM($id)
+# Side Effects: update pcb.
+# Return Value: NUM
+sub set_article_id
+{
+ my ($curproc, $id) = @_;
+ my $pcb = $curproc->pcb();
+
+ $pcb->set("article_message", "id", $id);
+}
+
+
+# Descriptions: get the current article id on this process.
+# Arguments: OBJ($curproc)
+# Side Effects: none
+# Return Value: NUM
+sub get_article_id
+{
+ my ($curproc) = @_;
+ my $pcb = $curproc->pcb();
+
+ return $pcb->get("article_message", "id");
+}
+
+
+=head1 COMMAND PROCESSOER STATES
command_context_init() called for each command, so
restriction_state_*() is reset each time.
@@ -304,7 +335,7 @@ sub command_context_get_ml_name
}
-# Descriptions: declare no more further command processing needed
+# Descriptions: declare no more further command processing needed
# due to critical error.
# Arguments: OBJ($curproc)
# Side Effects: update pcb.
@@ -447,6 +478,39 @@ sub command_context_get_admin_password
}
+=head1 SMTP STATE
+
+=cut
+
+
+# Descriptions: set $mta as error for later hint.
+# implies "all servers" unless $mta specified.
+# Arguments: OBJ($curproc) MTA($mta)
+# Side Effects: update pcb.
+# Return Value: none
+sub smtp_server_state_set_error
+{
+ my ($curproc, $mta) = @_;
+ my $pcb = $curproc->pcb();
+
+ $pcb->set("smtp_transaction", $mta || "ALL", "error");
+}
+
+
+# Descriptions: check if $mta as error for later hint.
+# implies "all servers" unless $mta specified.
+# Arguments: OBJ($curproc)
+# Side Effects: update pcb.
+# Return Value: NUM(1 or 0)
+sub smtp_server_state_get_error
+{
+ my ($curproc, $mta) = @_;
+ my $pcb = $curproc->pcb();
+
+ return( $pcb->get("smtp_transaction", $mta || "ALL") ? 1 : 0 );
+}
+
+
=head1 UTILITY
=head2 error_message_set_count($class)