summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process
diff options
context:
space:
mode:
authorfukachan <fukachan>2004-04-22 12:43:19 +0000
committerfukachan <fukachan>2004-04-22 12:43:19 +0000
commit5e11684f92fc8fbbeb9a6831c180f513e2d5df8f (patch)
treeaf18fd88e8aef9ca8e3f7750f9d0a434596c7a1f /fml/lib/FML/Process
parent479a11a060c1c15e807f4fcd27c3e3cc41217426 (diff)
downloadfml8-5e11684f92fc8fbbeb9a6831c180f513e2d5df8f.tar.gz
fml8-5e11684f92fc8fbbeb9a6831c180f513e2d5df8f.tar.bz2
fml8-5e11684f92fc8fbbeb9a6831c180f513e2d5df8f.zip
check $context if it is well defined. if ok, call command.
check value by command_context_get_normal_stop() to stop this process.
Diffstat (limited to 'fml/lib/FML/Process')
-rw-r--r--fml/lib/FML/Process/Command.pm21
1 files changed, 17 insertions, 4 deletions
diff --git a/fml/lib/FML/Process/Command.pm b/fml/lib/FML/Process/Command.pm
index 2c10274a..d9dbda6e 100644
--- a/fml/lib/FML/Process/Command.pm
+++ b/fml/lib/FML/Process/Command.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2000,2001,2002,2003,2004 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Command.pm,v 1.101 2004/03/12 11:45:50 fukachan Exp $
+# $FML: Command.pm,v 1.102 2004/03/14 06:47:38 fukachan Exp $
#
package FML::Process::Command;
@@ -304,11 +304,24 @@ sub _command_process_loop
# XXX analyze the iput command and set info into $context.
$context = $curproc->command_context_init($orig_command);
- # XXX call command actually.
- $curproc->_command_switch($context);
+ # if $context is empty HASH_REF, no valid command in this line.
+ if (defined $context->{ comname }) {
+ # XXX call command actually.
+ $curproc->_command_switch($context);
+ }
+ else {
+ $num_ignored++;
+ }
# XXX error handlings.
- # 1. command evaluation ends.
+ # 1. stop here e.g. we processed "unsubscribe" above, so stop here.
+ if ($curproc->command_context_get_normal_stop()) {
+ $curproc->reply_message_nl('command.stop', "stopped.");
+ $curproc->log("command processing stop.");
+ last COMMAND;
+ }
+
+ # 2. command evaluation ends.
# it should be notified by using $curproc->stop_this_process().
if ($curproc->command_context_get_stop_process()) {
$curproc->logerror("command processing stop.");