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

raeburn raeburn@source.lon-capa.org
Fri, 07 Jan 2011 06:24:42 -0000


raeburn		Fri Jan  7 06:24:42 2011 EDT

  Modified files:              (Branch: version_2_10_X)
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - Backport 1.1096.
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1056.4.16 loncom/lonnet/perl/lonnet.pm:1.1056.4.17
--- loncom/lonnet/perl/lonnet.pm:1.1056.4.16	Sat Dec 25 03:27:06 2010
+++ loncom/lonnet/perl/lonnet.pm	Fri Jan  7 06:24:41 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1056.4.16 2010/12/25 03:27:06 raeburn Exp $
+# $Id: lonnet.pm,v 1.1056.4.17 2011/01/07 06:24:41 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -7404,7 +7404,7 @@
 }
 
 sub is_locked {
-    my ($file_name, $domain, $user) = @_;
+    my ($file_name, $domain, $user, $which) = @_;
     my @check;
     my $is_locked;
     push(@check,$file_name);
@@ -7416,9 +7416,13 @@
     if (ref($locked{$file_name}) eq 'ARRAY') {
         $is_locked = 'false';
         foreach my $entry (@{$locked{$file_name}}) {
-           if (ref($entry) eq 'ARRAY') { 
+           if (ref($entry) eq 'ARRAY') {
                $is_locked = 'true';
-               last;
+               if (ref($which) eq 'ARRAY') {
+                   push(@{$which},$entry);
+               } else {
+                   last;
+               }
            }
        }
     } else {