version 1.241, 2002/06/18 19:39:13
|
version 1.242, 2002/06/24 14:16:58
|
Line 1840 sub log_query {
|
Line 1840 sub log_query {
|
my $queryid=&reply("querysend:".$query.':'.$udom.':'.$uname.':'.$command, |
my $queryid=&reply("querysend:".$query.':'.$udom.':'.$uname.':'.$command, |
$uhome); |
$uhome); |
unless ($queryid=~/^$uhost\_/) { return 'error: '.$queryid; } |
unless ($queryid=~/^$uhost\_/) { return 'error: '.$queryid; } |
|
return get_query_reply($queryid); |
|
} |
|
|
|
sub get_query_reply { |
|
my $queryid=shift; |
my $replyfile=$perlvar{'lonDaemons'}.'/tmp/'.$queryid; |
my $replyfile=$perlvar{'lonDaemons'}.'/tmp/'.$queryid; |
my $reply=''; |
my $reply=''; |
for (1..100) { |
for (1..100) { |
Line 1849 sub log_query {
|
Line 1854 sub log_query {
|
$reply.=<$fh>; |
$reply.=<$fh>; |
$fh->close; |
$fh->close; |
} else { return 'error: reply_file_error'; } |
} else { return 'error: reply_file_error'; } |
} |
return &unescape($reply); |
return &unescape($reply); |
} |
} |
} |
return 'error: timeout'; |
return 'timeout:'.$queryid; |
} |
} |
|
|
sub courselog_query { |
sub courselog_query { |
Line 2689 sub symbclean {
|
Line 2694 sub symbclean {
|
|
|
sub symbread { |
sub symbread { |
my $thisfn=shift; |
my $thisfn=shift; |
|
# no filename provided? try from environment |
unless ($thisfn) { |
unless ($thisfn) { |
if ($ENV{'request.symb'}) { return &symbclean($ENV{'request.symb'}); } |
if ($ENV{'request.symb'}) { return &symbclean($ENV{'request.symb'}); } |
$thisfn=$ENV{'request.filename'}; |
$thisfn=$ENV{'request.filename'}; |
} |
} |
|
# is that filename actually a symb? Verify, clean, and return |
|
if ($thisfn=~/\_\_\_\d+\_\_\_(.*)$/) { |
|
if (&symbverify($thisfn,$1)) { return &symbclean($thisfn); } |
|
} |
$thisfn=declutter($thisfn); |
$thisfn=declutter($thisfn); |
my %hash; |
my %hash; |
my %bighash; |
my %bighash; |
Line 2721 sub symbread {
|
Line 2731 sub symbread {
|
unless ($ids) { |
unless ($ids) { |
$ids=$bighash{'ids_/'.$thisfn}; |
$ids=$bighash{'ids_/'.$thisfn}; |
} |
} |
|
unless ($ids) { |
|
# alias? |
|
$ids=$bighash{'mapalias_'.$thisfn}; |
|
} |
if ($ids) { |
if ($ids) { |
# ------------------------------------------------------------------- Has ID(s) |
# ------------------------------------------------------------------- Has ID(s) |
my @possibilities=split(/\,/,$ids); |
my @possibilities=split(/\,/,$ids); |