[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm

albertel lon-capa-cvs-allow@mail.lon-capa.org
Wed, 13 Jun 2007 02:21:58 -0000


albertel		Tue Jun 12 22:21:58 2007 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - handle invalid input correctly
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.888 loncom/lonnet/perl/lonnet.pm:1.889
--- loncom/lonnet/perl/lonnet.pm:1.888	Tue Jun 12 21:43:54 2007
+++ loncom/lonnet/perl/lonnet.pm	Tue Jun 12 22:21:54 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.888 2007/06/13 01:43:54 albertel Exp $
+# $Id: lonnet.pm,v 1.889 2007/06/13 02:21:54 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -7601,7 +7601,10 @@
     $hostname ||= &hostname($perlvar{'lonHostID'});
     my @ids;
     my %name_to_host = &all_names();
-    return @{ $name_to_host{$hostname} };
+    if (ref($name_to_host{$hostname}) eq 'ARRAY') {
+	return @{ $name_to_host{$hostname} };
+    }
+    return;
 }
 
 sub additional_machine_domains {
@@ -7714,7 +7717,6 @@
 
 sub goodbye {
    &logthis("Starting Shut down");
-		    &logthis("test");
 #not converted to using infrastruture and probably shouldn't be
    &logthis(sprintf("%-20s is %s",'%badServerCache',length(&nfreeze(\%badServerCache))));
 #converted