diff options
| author | fukachan <fukachan> | 2006-02-05 01:02:52 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2006-02-05 01:02:52 +0000 |
| commit | 217b4c5a2ae017454e429a7f93a4e14d88099d16 (patch) | |
| tree | 5d4d75404ed0ad47a2739338514b6e65b98cd635 /fml/lib/FML/Process | |
| parent | fbdf5a8effb2524dffc3b52f65c6d0921997fa66 (diff) | |
| download | fml8-217b4c5a2ae017454e429a7f93a4e14d88099d16.tar.gz fml8-217b4c5a2ae017454e429a7f93a4e14d88099d16.tar.bz2 fml8-217b4c5a2ae017454e429a7f93a4e14d88099d16.zip | |
ignore *-ctl and *-admin addresses as a ML one.
Diffstat (limited to 'fml/lib/FML/Process')
| -rw-r--r-- | fml/lib/FML/Process/CreateOnPost.pm | 44 |
1 files changed, 39 insertions, 5 deletions
diff --git a/fml/lib/FML/Process/CreateOnPost.pm b/fml/lib/FML/Process/CreateOnPost.pm index cb1d171b..5c0d42e0 100644 --- a/fml/lib/FML/Process/CreateOnPost.pm +++ b/fml/lib/FML/Process/CreateOnPost.pm @@ -3,7 +3,7 @@ # Copyright (C) 2006 Ken'ichi Fukamachi # All rights reserved. # -# $FML: CreateOnPost.pm,v 1.7 2006/01/09 14:00:54 fukachan Exp $ +# $FML: CreateOnPost.pm,v 1.1 2006/02/04 08:00:09 fukachan Exp $ # package FML::Process::CreateOnPost; @@ -392,7 +392,7 @@ sub _run_createonpost # 1. my $cop_list= $class_to_address->{ $ADDR_CREATE_ON_POST } || []; for my $ml (@$cop_list) { - if ($curproc->is_fml8_managed_address($ml)) { + if ($curproc->_is_ml_address($ml)) { $curproc->log("ml exist: $ml"); } else { @@ -418,9 +418,15 @@ sub _run_createonpost # 3. run distribute processes. for my $ml (@$cop_list) { - if ($curproc->is_fml8_managed_address($ml)) { - $curproc->_distribute_ml($ml); - } + # XXX bound for elena (NOT elena-ctl NOR elena-admin). + if ($curproc->_is_ml_address($ml)) { + if ($curproc->is_fml8_managed_address($ml)) { + $curproc->_distribute_ml($ml); + } + else { + $curproc->logwarn("$ml ignored"); + } + } else { $curproc->logerror("$ml not found"); } @@ -428,6 +434,34 @@ sub _run_createonpost } +# Descriptions: check if the given address is one of ML addresses +# (ML, ML-ctl and ML-admin). +# Arguments: OBJ($curproc) STR($addr) +# Side Effects: none +# Return Value: NUM +sub _is_ml_address +{ + my ($curproc, $addr) = @_; + my ($ctl, $admin); + + # elena + if ($curproc->is_fml8_managed_address($addr)) { + return 1; + } + # elena-ctl + elsif ($addr =~ /-ctl\@/) { + return 1; + } + # elena-admin + elsif ($addr =~ /-admin\@/) { + return 1; + } + else { + return 0; + } +} + + # Descriptions: save user list for child process. # Arguments: OBJ($curproc) ARRAY_REF($list) # Side Effects: none |
