--- loncom/lond	2007/04/04 00:02:50	1.369
+++ loncom/lond	2007/04/04 00:49:13	1.372
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # lond "LON Daemon" Server (port "LOND" 5663)
 #
-# $Id: lond,v 1.369 2007/04/04 00:02:50 albertel Exp $
+# $Id: lond,v 1.372 2007/04/04 00:49:13 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.369 $'; #' stupid emacs
+my $VERSION='$Revision: 1.372 $'; #' 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}).'&';
@@ -5044,12 +5048,11 @@ sub UpdateHosts {
     #  either dropped or changed hosts.  Note that the re-read of the table
     #  will take care of new and changed hosts as connections come into being.
 
-    #FIXME need a way to tell lonnet that it needs to reset host
-    #cached host info
+    &Apache::lonnet::reset_hosts_info();
 
     foreach my $child (keys(%children)) {
 	my $childip = $children{$child};
-	if (defined(&Apache::lonnet::get_hosts_from_ip($childip))) {
+	if (!defined(&Apache::lonnet::get_hosts_from_ip($childip))) {
 	    logthis('<font color="blue"> UpdateHosts killing child '
 		    ." $child for ip $childip </font>");
 	    kill('INT', $child);
@@ -5367,8 +5370,6 @@ sub make_new_child {
 # -----------------------------------------------------------------------------
 	# see if we know client and 'check' for spoof IP by ineffective challenge
 
-	ReadManagerTable;	# May also be a manager!!
-	
 	my $outsideip=$clientip;
 	if ($clientip eq '127.0.0.1') {
 	    $outsideip=&Apache::lonnet::get_host_ip($perlvar{'lonHostID'});