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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 09 Feb 2006 23:41:24 -0000


albertel		Thu Feb  9 18:41:24 2006 EDT

  Modified files:              (Branch: store_expirement)
    /loncom	lond 
  Log:
  - get rid of the copy/paste code
  
  
Index: loncom/lond
diff -u loncom/lond:1.318.2.3 loncom/lond:1.318.2.4
--- loncom/lond:1.318.2.3	Thu Feb  9 15:48:40 2006
+++ loncom/lond	Thu Feb  9 18:41:22 2006
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # lond "LON Daemon" Server (port "LOND" 5663)
 #
-# $Id: lond,v 1.318.2.3 2006/02/09 20:48:40 albertel Exp $
+# $Id: lond,v 1.318.2.4 2006/02/09 23:41:22 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.3 $'; #' stupid emacs
+my $VERSION='$Revision: 1.318.2.4 $'; #' stupid emacs
 my $remoteVERSION;
 my $currenthostid="default";
 my $currentdomainid;
@@ -2915,16 +2915,11 @@
 	while (my ($key,$value) = each(%$hashref)) {
 	    my ($v,$symb,$param) = split(/:/,$key);
 	    next if ($v eq 'version' || $symb eq 'keys');
-	    if (!defined($param)) {
-		foreach my $pair (split(/\&/,$value)) {
-		    my ($param,$value)=split(/=/,$pair);
-		    next if (exists($data{$symb}) && 
-			     exists($data{$symb}->{$param}) &&
-			     $data{$symb}->{'v.'.$param} > $v);
-		    $data{$symb}->{$param}=$value;
-		    $data{$symb}->{'v.'.$param}=$v;
-		}
-	    } else {
+	    # making old style store  entries '$ver:$symb:$key = $value'
+	    # look like new                   '$ver:$symb = "$key=$value"'
+	    if (defined($param)) { $value = $param.'='.$value; }	    
+	    foreach my $pair (split(/\&/,$value)) {
+		my ($param,$value)=split(/=/,$pair);
 		next if (exists($data{$symb}) && 
 			 exists($data{$symb}->{$param}) &&
 			 $data{$symb}->{'v.'.$param} > $v);