--- loncom/lond 2012/04/26 20:00:57 1.493 +++ loncom/lond 2012/07/17 14:49:39 1.494 @@ -2,7 +2,7 @@ # The LearningOnline Network # lond "LON Daemon" Server (port "LOND" 5663) # -# $Id: lond,v 1.493 2012/04/26 20:00:57 droeschl Exp $ +# $Id: lond,v 1.494 2012/07/17 14:49:39 droeschl Exp $ # # Copyright Michigan State University Board of Trustees # @@ -61,7 +61,7 @@ my $DEBUG = 0; # Non zero to ena my $status=''; my $lastlog=''; -my $VERSION='$Revision: 1.493 $'; #' stupid emacs +my $VERSION='$Revision: 1.494 $'; #' stupid emacs my $remoteVERSION; my $currenthostid="default"; my $currentdomainid; @@ -3176,6 +3176,17 @@ sub get_profile_keys { sub dump_profile_database { my ($cmd, $tail, $client) = @_; + my $res = LONCAPA::Lond::dump_profile_database($tail); + + if ($res =~ /^error:/) { + Failure($client, \$res, "$cmd:$tail"); + } else { + Reply($client, \$res, "$cmd:$tail"); + } + + return 1; + + #TODO remove my $userinput = "$cmd:$tail"; my ($udom,$uname,$namespace) = split(/:/,$tail); @@ -3254,7 +3265,7 @@ sub dump_profile_database { sub dump_with_regexp { my ($cmd, $tail, $client) = @_; - my $res = LONCAPA::Lond::dump_with_regexp($tail, $clientname, $clientversion); + my $res = LONCAPA::Lond::dump_with_regexp($tail, $clientversion); if ($res =~ /^error:/) { Failure($client, \$res, "$cmd:$tail"); @@ -3838,6 +3849,17 @@ sub put_course_id_hash_handler { # a reply is written to $client. sub dump_course_id_handler { my ($cmd, $tail, $client) = @_; + + my $res = LONCAPA::Lond::dump_course_id_handler($tail); + if ($res =~ /^error:/) { + Failure($client, \$res, "$cmd:$tail"); + } else { + Reply($client, \$res, "$cmd:$tail"); + } + + return 1; + + #TODO remove my $userinput = "$cmd:$tail"; my ($udom,$since,$description,$instcodefilter,$ownerfilter,$coursefilter, @@ -6495,10 +6517,13 @@ sub make_new_child { # # If the remote is attempting a local init... give that a try: # + logthis("remotereq: $remotereq"); (my $i, my $inittype, $clientversion) = split(/:/, $remotereq); # For LON-CAPA 2.9, the client session will have sent its LON-CAPA # version when initiating the connection. For LON-CAPA 2.8 and older, # the version is retrieved from the global %loncaparevs in lonnet.pm. + # $clientversion contains path to keyfile if $inittype eq 'local' + # it's overridden below in this case $clientversion ||= $Apache::lonnet::loncaparevs{$clientname}; # If the connection type is ssl, but I didn't get my