[LON-CAPA-cvs] cvs: loncom(version_2_1_X) / lond

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 31 May 2006 14:46:50 -0000


albertel		Wed May 31 10:46:50 2006 EDT

  Modified files:              (Branch: version_2_1_X)
    /loncom	lond 
  Log:
  - need to lock the env file to successfully read from it 
     (student photos failed to show up because of conflicts over desire to
      write new tokesn to the env and desire to read if the token existed)
  
  
Index: loncom/lond
diff -u loncom/lond:1.305.2.6 loncom/lond:1.305.2.7
--- loncom/lond:1.305.2.6	Thu May 18 15:58:36 2006
+++ loncom/lond	Wed May 31 10:46:48 2006
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # lond "LON Daemon" Server (port "LOND" 5663)
 #
-# $Id: lond,v 1.305.2.6 2006/05/18 19:58:36 albertel Exp $
+# $Id: lond,v 1.305.2.7 2006/05/31 14:46:48 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -61,7 +61,7 @@
 my $lastlog='';
 my $lond_max_wait_time = 13;
 
-my $VERSION='$Revision: 1.305.2.6 $'; #' stupid emacs
+my $VERSION='$Revision: 1.305.2.7 $'; #' stupid emacs
 my $remoteVERSION;
 my $currenthostid="default";
 my $currentdomainid;
@@ -2290,6 +2290,7 @@
     my $reply="non_auth\n";
     if (open(ENVIN,$perlvar{'lonIDsDir'}.'/'.
 	     $session.'.id')) {
+	flock(ENVIN,LOCK_SH);
 	while (my $line=<ENVIN>) {
 	    my ($envname)=split(/=/,$line,2);
 	    $envname=&unescape($envname);