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

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 28 Jan 2005 09:26:29 -0000


albertel		Fri Jan 28 04:26:29 2005 EDT

  Modified files:              (Branch: version_1_3_X)
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - Err oops
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.587.2.2 loncom/lonnet/perl/lonnet.pm:1.587.2.3
--- loncom/lonnet/perl/lonnet.pm:1.587.2.2	Fri Jan 28 04:25:18 2005
+++ loncom/lonnet/perl/lonnet.pm	Fri Jan 28 04:26:28 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.587.2.2 2005/01/28 09:25:18 albertel Exp $
+# $Id: lonnet.pm,v 1.587.2.3 2005/01/28 09:26:28 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2092,11 +2092,9 @@
   $namespace=~s/\//\_/g;
   $namespace=~s/\W//g;
 
+  #FIXME needs to do something for /pub resources
   if (!$domain) { $domain=$ENV{'user.domain'}; }
   if (!$stuname) { $stuname=$ENV{'user.name'}; }
-  if ($domain eq 'public' && $stuname eq 'public') {
-      $stuname=$ENV{'REMOTE_ADDR'};
-  }
   my $path=$perlvar{'lonDaemons'}.'/tmp';
   my %hash;
   if (tie(%hash,'GDBM_File',
@@ -2129,11 +2127,9 @@
   }
   $namespace=~s/\//\_/g;
   $namespace=~s/\W//g;
+#FIXME needs to do something for /pub resources
   if (!$domain) { $domain=$ENV{'user.domain'}; }
   if (!$stuname) { $stuname=$ENV{'user.name'}; }
-  if ($domain eq 'public' && $stuname eq 'public') {
-      $stuname=$ENV{'REMOTE_ADDR'};
-  }
   my $now=time;
   my %hash;
   my $path=$perlvar{'lonDaemons'}.'/tmp';
@@ -2145,7 +2141,7 @@
     my $allkeys=''; 
     foreach my $key (keys(%$storehash)) {
       $allkeys.=$key.':';
-      $hash{"$version:$symb:$key"}=&freeze_escape($$storehash{$key});
+      $hash{"$version:$symb:$key"}=$$storehash{$key};
     }
     $hash{"$version:$symb:timestamp"}=$now;
     $allkeys.='timestamp';
@@ -2172,12 +2168,10 @@
   $symb=escape($symb);
 
   if (!$namespace) { $namespace=$ENV{'request.state'}; }
-
+  #FIXME needs to do something for /pub resources
   if (!$domain) { $domain=$ENV{'user.domain'}; }
   if (!$stuname) { $stuname=$ENV{'user.name'}; }
-  if ($domain eq 'public' && $stuname eq 'public') {
-      $stuname=$ENV{'REMOTE_ADDR'};
-  }
+
   my %returnhash;
   $namespace=~s/\//\_/g;
   $namespace=~s/\W//g;
@@ -2195,8 +2189,8 @@
       my $key;
       $returnhash{"$scope:keys"}=$vkeys;
       foreach $key (@keys) {
-	$returnhash{"$scope:$key"}=&thaw_unescape($hash{"$scope:$symb:$key"});
-	$returnhash{"$key"}=&thaw_unescape($hash{"$scope:$symb:$key"});
+	$returnhash{"$scope:$key"}=$hash{"$scope:$symb:$key"};
+	$returnhash{"$key"}=$hash{"$scope:$symb:$key"};
       }
     }
     if (!(untie(%hash))) {
@@ -2237,7 +2231,7 @@
 
     my $namevalue='';
     foreach (keys %$storehash) {
-        $namevalue.=&escape($_).'='.&freeze_escape($$storehash{$_}).'&';
+        $namevalue.=escape($_).'='.escape($$storehash{$_}).'&';
     }
     $namevalue=~s/\&$//;
     &courselog($symb.':'.$stuname.':'.$domain.':STORE:'.$namevalue);
@@ -2273,7 +2267,7 @@
 
     my $namevalue='';
     foreach (keys %$storehash) {
-        $namevalue.=&escape($_).'='.&freeze_escape($$storehash{$_}).'&';
+        $namevalue.=escape($_).'='.escape($$storehash{$_}).'&';
     }
     $namevalue=~s/\&$//;
     &courselog($symb.':'.$stuname.':'.$domain.':CSTORE:'.$namevalue);
@@ -2307,7 +2301,7 @@
     my %returnhash=();
     foreach (split(/\&/,$answer)) {
 	my ($name,$value)=split(/\=/,$_);
-        $returnhash{&unescape($name)}=&thaw_unescape($value);
+        $returnhash{&unescape($name)}=&unescape($value);
     }
     my $version;
     for ($version=1;$version<=$returnhash{'version'};$version++) {
@@ -2698,7 +2692,7 @@
            my $key = $1.':keys:'.$2;
            $allitems{$key} .= $3.':';
        }
-       $items.=$_.'='.&freeze_escape($$storehash{$_}).'&';
+       $items.=$_.'='.&escape($$storehash{$_}).'&';
    }
    foreach (keys %allitems) {
        $allitems{$_} =~ s/\:$//;