version 1.1391, 2018/11/28 05:05:36
|
version 1.1393, 2018/12/05 21:36:18
|
Line 747 sub timed_flock {
|
Line 747 sub timed_flock {
|
} |
} |
} |
} |
|
|
|
sub get_sessionfile_vars { |
|
my ($handle,$lonidsdir,$storearr) = @_; |
|
my %returnhash; |
|
unless (ref($storearr) eq 'ARRAY') { |
|
return %returnhash; |
|
} |
|
if (-l "$lonidsdir/$handle.id") { |
|
my $link = readlink("$lonidsdir/$handle.id"); |
|
if ((-e $link) && ($link =~ m{^\Q$lonidsdir\E/(.+)\.id$})) { |
|
$handle = $1; |
|
} |
|
} |
|
if ((-e "$lonidsdir/$handle.id") && |
|
($handle =~ /^($match_username)\_\d+\_($match_domain)\_(.+)$/)) { |
|
my ($possuname,$possudom,$possuhome) = ($1,$2,$3); |
|
if ((&domain($possudom) ne '') && (&homeserver($possuname,$possudom) eq $possuhome)) { |
|
if (open(my $idf,'+<',"$lonidsdir/$handle.id")) { |
|
flock($idf,LOCK_SH); |
|
if (tie(my %disk_env,'GDBM_File',"$lonidsdir/$handle.id", |
|
&GDBM_READER(),0640)) { |
|
foreach my $item (@{$storearr}) { |
|
$returnhash{$item} = $disk_env{$item}; |
|
} |
|
untie(%disk_env); |
|
} |
|
} |
|
} |
|
} |
|
return %returnhash; |
|
} |
|
|
# ---------------------------------------------------------- Append Environment |
# ---------------------------------------------------------- Append Environment |
|
|
sub appenv { |
sub appenv { |
Line 1612 sub check_balancer_result {
|
Line 1643 sub check_balancer_result {
|
$is_balancer = 1; |
$is_balancer = 1; |
$currtargets = $result->{'targets'}; |
$currtargets = $result->{'targets'}; |
$currrules = $result->{'rules'}; |
$currrules = $result->{'rules'}; |
$dom_balancers = $currbalancer; |
|
} |
} |
$dom_balancers = $currbalancer; |
$dom_balancers = $currbalancer; |
} else { |
} else { |
Line 5323 sub set_first_access {
|
Line 5353 sub set_first_access {
|
my $firstaccess=&get_first_access($type,$symb,$map); |
my $firstaccess=&get_first_access($type,$symb,$map); |
if ($firstaccess) { |
if ($firstaccess) { |
&logthis("First access time already set ($firstaccess) when attempting ". |
&logthis("First access time already set ($firstaccess) when attempting ". |
"to set new value (type: $type, extent: $res) for $uname:$udom ". |
"to set new value (type: $type, extent: $res) for $uname:$udom ". |
"in $courseid"); |
"in $courseid"); |
return 'already_set'; |
return 'already_set'; |
} else { |
} else { |
my $start = time; |
my $start = time; |