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

albertel lon-capa-cvs-allow@mail.lon-capa.org
Mon, 18 Jun 2007 22:52:34 -0000


albertel		Mon Jun 18 18:52:34 2007 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - eliminate unused pathway
  - need to reset another internal cache
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.891 loncom/lonnet/perl/lonnet.pm:1.892
--- loncom/lonnet/perl/lonnet.pm:1.891	Mon Jun 18 18:49:57 2007
+++ loncom/lonnet/perl/lonnet.pm	Mon Jun 18 18:52:33 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.891 2007/06/18 22:49:57 albertel Exp $
+# $Id: lonnet.pm,v 1.892 2007/06/18 22:52:33 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -7872,6 +7872,7 @@
     sub reset_hosts_info {
 	&reset_domain_info();
 	&reset_hosts_ip_info();
+	undef(%name_to_host);
 	undef(%hostname);
 	undef(%hostdom);
 	undef(%libserv);
@@ -7963,24 +7964,6 @@
     my %name_to_ip;
     my %lonid_to_ip;
 
-    my %valid_ip;
-    sub valid_ip {
-	my ($ip) = @_;
-	if (exists($iphost{$ip}) || exists($valid_ip{$ip})) {
-	    return 1;	
-	}
-	my $name = gethostbyip($ip);
-	my $lonid = &hostname($name);
-	if (defined($lonid)) {
-	    $valid_ip{$ip} = $lonid;
-	    return 1;
-	}
-	my %iphosts = &get_iphost();
-	if (ref($iphost{$ip})) {
-	    return 1;	
-	}
-    }
-
     sub get_hosts_from_ip {
 	my ($ip) = @_;
 	my %iphosts = &get_iphost();