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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 15 Jan 2004 19:41:00 -0000


albertel		Thu Jan 15 14:41:00 2004 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - BUG#2601, check if the value exists before blindly returning, we might be looking in the wrong package
  - to go in 1.1.1
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.462 loncom/lonnet/perl/lonnet.pm:1.463
--- loncom/lonnet/perl/lonnet.pm:1.462	Tue Jan 13 11:33:37 2004
+++ loncom/lonnet/perl/lonnet.pm	Thu Jan 15 14:41:00 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.462 2004/01/13 16:33:37 albertel Exp $
+# $Id: lonnet.pm,v 1.463 2004/01/15 19:41:00 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3822,7 +3822,9 @@
     foreach my $package (split(/,/,$packages)) {
 	my ($pack_type,$pack_part)=split(/_/,$package,2);
 	if ($pack_part eq $part) {
-	    return $packagetab{"$pack_type&$name&default"};
+	    if (defined($packagetab{"$pack_type&$name&default"})) {
+		return $packagetab{"$pack_type&$name&default"};
+	    }
 	}
     }
     return undef;