--- loncom/lond 2004/06/21 14:08:20 1.201 +++ loncom/lond 2004/06/29 14:56:32 1.202 @@ -2,7 +2,7 @@ # The LearningOnline Network # lond "LON Daemon" Server (port "LOND" 5663) # -# $Id: lond,v 1.201 2004/06/21 14:08:20 matthew Exp $ +# $Id: lond,v 1.202 2004/06/29 14:56:32 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -56,7 +56,7 @@ my $DEBUG = 11; # Non zero to en my $status=''; my $lastlog=''; -my $VERSION='$Revision: 1.201 $'; #' stupid emacs +my $VERSION='$Revision: 1.202 $'; #' stupid emacs my $remoteVERSION; my $currenthostid; my $currentdomainid; @@ -2836,8 +2836,8 @@ sub make_new_child { my %hash; if (tie(%hash,'GDBM_File',"$proname.db",&GDBM_WRCREAT(),0640)) { foreach my $pair (@pairs) { - my ($key,$value)=split(/=/,$pair); - $hash{$key}=$value.':'.$now; + my ($key,$descr,$inst_code)=split(/=/,$pair); + $hash{$key}=$descr.':'.$inst_code.':'.$now; } if (untie(%hash)) { print $client "ok\n"; @@ -2872,14 +2872,19 @@ sub make_new_child { my %hash; if (tie(%hash,'GDBM_File',"$proname.db",&GDBM_READER(),0640)) { while (my ($key,$value) = each(%hash)) { - my ($descr,$lasttime)=split(/\:/,$value); + my ($descr,$lasttime,$inst_code); + if ($value =~ m/^([^\:]*):([^\:]*):(\d+)$/) { + ($descr,$inst_code,$lasttime)=($1,$2,$3); + } else { + ($descr,$lasttime) = split(/\:/,$value); + } if ($lasttime<$since) { next; } if ($description eq '.') { - $qresult.=$key.'='.$descr.'&'; + $qresult.=$key.'='.$descr.':'.$inst_code.'&'; } else { my $unescapeVal = &unescape($descr); if (eval('$unescapeVal=~/\Q$description\E/i')) { - $qresult.="$key=$descr&"; + $qresult.=$key.'='.$descr.':'.$inst_code.'&'; } } }