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

albertel lon-capa-cvs-allow@mail.lon-capa.org
Mon, 01 Oct 2007 23:54:55 -0000


albertel		Mon Oct  1 19:54:55 2007 EDT

  Modified files:              (Branch: version_2_5_X)
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - backport relevant parts of 1.917
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.910.2.3 loncom/lonnet/perl/lonnet.pm:1.910.2.4
--- loncom/lonnet/perl/lonnet.pm:1.910.2.3	Mon Oct  1 17:54:06 2007
+++ loncom/lonnet/perl/lonnet.pm	Mon Oct  1 19:54:54 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.910.2.3 2007/10/01 21:54:06 albertel Exp $
+# $Id: lonnet.pm,v 1.910.2.4 2007/10/01 23:54:54 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -320,8 +320,8 @@
     my ($lonidsdir,$handle)=@_;
     my @profile;
     {
-	open(my $idf,'+<',"$lonidsdir/$handle.id");
-	if (!$idf) {
+	my $opened = open(my $idf,'+<',"$lonidsdir/$handle.id");
+	if (!$opened) {
 	    return 0;
 	}
 	flock($idf,LOCK_SH);
@@ -362,8 +362,8 @@
 
     my $convert;
     {
-    	open(my $idf,'+<',"$lonidsdir/$handle.id");
-	if (!$idf) {
+    	my $opened = open(my $idf,'+<',"$lonidsdir/$handle.id");
+	if (!$opened) {
 	    return;
 	}
 	flock($idf,LOCK_SH);
@@ -431,8 +431,8 @@
             $env{$key}=$newenv{$key};
         }
     }
-    open(my $env_file,'+<',$env{'user.environment'});
-    if ($env_file
+    my $opened = open(my $env_file,'+<',$env{'user.environment'});
+    if ($opened
 	&& &timed_flock($env_file,LOCK_EX)
 	&&
 	tie(my %disk_env,'GDBM_File',$env{'user.environment'},
@@ -453,8 +453,8 @@
                 "Attempt to delete from environment ".$delthis);
         return 'error';
     }
-    open(my $env_file,'+<',$env{'user.environment'});
-    if ($env_file
+    my $opened = open(my $env_file,'+<',$env{'user.environment'});
+    if ($opened
 	&& &timed_flock($env_file,LOCK_EX)
 	&&
 	tie(my %disk_env,'GDBM_File',$env{'user.environment'},