[LON-CAPA-cvs] cvs: loncom(store_expirement) / lond

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 03 Mar 2006 22:03:18 -0000


albertel		Fri Mar  3 17:03:18 2006 EDT

  Modified files:              (Branch: store_expirement)
    /loncom	lond 
  Log:
  - annotate the compressed versions  as such
  
  
Index: loncom/lond
diff -u loncom/lond:1.318.2.4 loncom/lond:1.318.2.5
--- loncom/lond:1.318.2.4	Thu Feb  9 18:41:22 2006
+++ loncom/lond	Fri Mar  3 17:03:17 2006
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # lond "LON Daemon" Server (port "LOND" 5663)
 #
-# $Id: lond,v 1.318.2.4 2006/02/09 23:41:22 albertel Exp $
+# $Id: lond,v 1.318.2.5 2006/03/03 22:03:17 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -61,7 +61,7 @@
 my $lastlog='';
 my $lond_max_wait_time = 13;
 
-my $VERSION='$Revision: 1.318.2.4 $'; #' stupid emacs
+my $VERSION='$Revision: 1.318.2.5 $'; #' stupid emacs
 my $remoteVERSION;
 my $currenthostid="default";
 my $currentdomainid;
@@ -2916,8 +2916,12 @@
 	    my ($v,$symb,$param) = split(/:/,$key);
 	    next if ($v eq 'version' || $symb eq 'keys');
 	    # making old style store  entries '$ver:$symb:$key = $value'
-	    # look like new                   '$ver:$symb = "$key=$value"'
-	    if (defined($param)) { $value = $param.'='.$value; }	    
+	    # look like new             '$ver:compressed:$symb = "$key=$value"'
+	    if ($symb eq 'compressed') {
+		$symb = $param;
+	    } else {
+		$value = $param.'='.$value;
+	    }
 	    foreach my $pair (split(/\&/,$value)) {
 		my ($param,$value)=split(/=/,$pair);
 		next if (exists($data{$symb}) && 
@@ -3077,7 +3081,7 @@
 		my ($key)=split(/=/,$pair);
 		$allkeys.=$key.':';
 	    }
-	    $hashref->{"$version:$rid"}=$what."\&timestamp=$now";
+	    $hashref->{"$version:compressed:$rid"}=$what."\&timestamp=$now";
 	    $allkeys.='timestamp';
 	    $hashref->{"$version:keys:$rid"}=$allkeys;
 	    if (&untie_user_hash($hashref)) {
@@ -3143,9 +3147,8 @@
 	    my @keys=split(/:/,$vkeys);
 	    my $key;
 	    $qresult.="$scope:keys=$vkeys&";
-	    if (exists($hashref->{"$scope:$rid"})) {
-		my $what=$hashref->{"$scope:$rid"};
-		foreach my $pair (split(/\&/,$hashref->{"$scope:$rid"})) {
+	    if (exists($hashref->{"$scope:compressed:$rid"})) {
+		foreach my $pair (split(/\&/,$hashref->{"$scope:compressed:$rid"})) {
 		    my ($key,$value)=split(/=/,$pair);
 		    $qresult.="$scope:".$pair."&";
 		}