summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process/Utils.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-06-24 07:00:12 +0000
committerfukachan <fukachan>2002-06-24 07:00:12 +0000
commitf094e5e5a1aa9dd3ccb9a72d5e0cd5d083cf65be (patch)
tree6aa1c66754bbd2eea79927a5750530117a83120c /fml/lib/FML/Process/Utils.pm
parentc3a4de6eb88421ef5e745279cc3b574bd4d62ecb (diff)
downloadfml8-f094e5e5a1aa9dd3ccb9a72d5e0cd5d083cf65be.tar.gz
fml8-f094e5e5a1aa9dd3ccb9a72d5e0cd5d083cf65be.tar.bz2
fml8-f094e5e5a1aa9dd3ccb9a72d5e0cd5d083cf65be.zip
get_ml_list(): check $ml_home_prefix, bug fix default domain handling
Diffstat (limited to 'fml/lib/FML/Process/Utils.pm')
-rw-r--r--fml/lib/FML/Process/Utils.pm13
1 files changed, 11 insertions, 2 deletions
diff --git a/fml/lib/FML/Process/Utils.pm b/fml/lib/FML/Process/Utils.pm
index d807cf4c..f5488895 100644
--- a/fml/lib/FML/Process/Utils.pm
+++ b/fml/lib/FML/Process/Utils.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: Utils.pm,v 1.24 2002/06/21 08:20:12 fukachan Exp $
+# $FML: Utils.pm,v 1.25 2002/06/22 14:42:50 fukachan Exp $
#
package FML::Process::Utils;
@@ -359,6 +359,7 @@ sub ml_home_dir
sub __ml_home_prefix_from_main_cf
{
my ($main_cf, $domain) = @_;
+ my $default_domain = $main_cf->{ default_domain };
if (defined $domain) {
my ($virtual_maps) = __get_virtual_maps($main_cf);
@@ -367,8 +368,11 @@ sub __ml_home_prefix_from_main_cf
$domain,
$virtual_maps);
}
+ elsif ("\L$domain\E" eq "\L$default_domain\E") {
+ return $main_cf->{ default_ml_home_prefix };
+ }
else {
- ;
+ croak("ml_home_prefix: unknown domain");
}
}
else {
@@ -560,6 +564,11 @@ sub get_ml_list
$ml_home_prefix = $curproc->ml_home_prefix($xx_domain);
}
+ # cheap sanity:
+ unless ($ml_home_prefix) {
+ croak("get_ml_list: ml_home_prefix undefined");
+ }
+
use File::Spec;
use DirHandle;
my $dh = new DirHandle $ml_home_prefix;