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

albertel lon-capa-cvs-allow@mail.lon-capa.org
Mon, 25 Jun 2007 23:30:29 -0000


albertel		Mon Jun 25 19:30:29 2007 EDT

  Modified files:              (Branch: version_2_4_X)
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - backport 1.892
  
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.890 loncom/lonnet/perl/lonnet.pm:1.890.2.1
--- loncom/lonnet/perl/lonnet.pm:1.890	Tue Jun 12 23:00:59 2007
+++ loncom/lonnet/perl/lonnet.pm	Mon Jun 25 19:30:27 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.890 2007/06/13 03:00:59 albertel Exp $
+# $Id: lonnet.pm,v 1.890.2.1 2007/06/25 23:30:27 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -7854,6 +7854,7 @@
     sub reset_hosts_info {
 	&reset_domain_info();
 	&reset_hosts_ip_info();
+	undef(%name_to_host);
 	undef(%hostname);
 	undef(%hostdom);
 	undef(%libserv);
@@ -7945,24 +7946,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();