--- loncom/lond 2007/04/03 00:49:55 1.368 +++ loncom/lond 2007/04/04 00:03:40 1.370 @@ -2,7 +2,7 @@ # The LearningOnline Network # lond "LON Daemon" Server (port "LOND" 5663) # -# $Id: lond,v 1.368 2007/04/03 00:49:55 albertel Exp $ +# $Id: lond,v 1.370 2007/04/04 00:03:40 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -59,7 +59,7 @@ my $DEBUG = 0; # Non zero to ena my $status=''; my $lastlog=''; -my $VERSION='$Revision: 1.368 $'; #' stupid emacs +my $VERSION='$Revision: 1.370 $'; #' stupid emacs my $remoteVERSION; my $currenthostid="default"; my $currentdomainid; @@ -4619,8 +4619,12 @@ sub inst_usertypes_handler { my ($cmd, $domain, $client) = @_; my $res; my $userinput = $cmd.":".$domain; # For logging purposes. - my (%typeshash,@order); - if (&localenroll::inst_usertypes($domain,\%typeshash,\@order) eq 'ok') { + my (%typeshash,@order,$result); + eval { + local($SIG{__DIE__})='DEFAULT'; + $result=&localenroll::inst_usertypes($domain,\%typeshash,\@order); + }; + if ($result eq 'ok') { if (keys(%typeshash) > 0) { foreach my $key (keys(%typeshash)) { $res.=&escape($key).'='.&escape($typeshash{$key}).'&'; @@ -6174,7 +6178,7 @@ sub sethost { if (&Apache::lonnet::get_host_ip($perlvar{'lonHostID'}) eq &Apache::lonnet::get_host_ip($hostid)) { $currenthostid =$hostid; - $currentdomainid=&Apache::lonnet::domain($hostid); + $currentdomainid=&Apache::lonnet::host_domain($hostid); &logthis("Setting hostid to $hostid, and domain to $currentdomainid"); } else { &logthis("Requested host id $hostid not an alias of ".