[LON-CAPA-cvs] cvs: loncom / lond

albertel lon-capa-cvs-allow@mail.lon-capa.org
Wed, 04 Apr 2007 00:03:40 -0000


albertel		Tue Apr  3 20:03:40 2007 EDT

  Modified files:              
    /loncom	lond 
  Log:
  - prevent bombing on machines with old localenrolls
  
  
Index: loncom/lond
diff -u loncom/lond:1.369 loncom/lond:1.370
--- loncom/lond:1.369	Tue Apr  3 20:02:50 2007
+++ loncom/lond	Tue Apr  3 20:03:40 2007
@@ -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.370 2007/04/04 00:03:40 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -59,7 +59,7 @@
 my $status='';
 my $lastlog='';
 
-my $VERSION='$Revision: 1.369 $'; #' stupid emacs
+my $VERSION='$Revision: 1.370 $'; #' stupid emacs
 my $remoteVERSION;
 my $currenthostid="default";
 my $currentdomainid;
@@ -4619,8 +4619,12 @@
     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}).'&';