--- loncom/lonnet/perl/lonnet.pm 2001/08/16 16:57:31 1.150
+++ loncom/lonnet/perl/lonnet.pm 2001/08/17 19:50:28 1.151
@@ -122,7 +122,7 @@
# 5/30 H. K. Ng
# 6/1 Gerd Kortemeyer
# July Guy Albertelli
-# 8/4,8/7,8/8,8/9,8/11,8/16 Gerd Kortemeyer
+# 8/4,8/7,8/8,8/9,8/11,8/16,8/17 Gerd Kortemeyer
package Apache::lonnet;
@@ -276,7 +276,8 @@ sub appenv {
map {
if (($newenv{$_}=~/^user\.role/) || ($newenv{$_}=~/^user\.priv/)) {
&logthis("WARNING: ".
- "Attempt to modify environment ".$_." to ".$newenv{$_});
+ "Attempt to modify environment ".$_." to ".$newenv{$_}
+ .'');
delete($newenv{$_});
} else {
$ENV{$_}=$newenv{$_};
@@ -672,7 +673,13 @@ sub checkout {
$symb.'&'.
$now.'&'.$ENV{'REMOTE_ADDR'});
my $token=&reply('tmpput:'.$infostr,$lonhost);
- if ($token=~/^error\:/) { return ''; }
+ if ($token=~/^error\:/) {
+ &logthis("WARNING: ".
+ "Checkout tmpput failed ".$tudom.' - '.$tuname.' - '.$symb.
+ "");
+ return '';
+ }
+
$token=~s/^(\d+)\_.*\_(\d+)$/$1\*$2\*$lonhost/;
$token=~tr/a-z/A-Z/;
@@ -682,13 +689,22 @@ sub checkout {
unless (&cstore(\%infohash,$symb,$tcrsid,$tudom,$tuname) eq 'ok') {
return '';
+ } else {
+ &logthis("WARNING: ".
+ "Checkout cstore failed ".$tudom.' - '.$tuname.' - '.$symb.
+ "");
}
if (&log($tudom,$tuname,&homeserver($tuname,$tudom),
&escape('Checkout '.$infostr.' - '.
$token)) ne 'ok') {
return '';
+ } else {
+ &logthis("WARNING: ".
+ "Checkout log failed ".$tudom.' - '.$tuname.' - '.$symb.
+ "");
}
+ return $token;
}
# ------------------------------------------------------------ Check in an item