--- loncom/loncnew 2020/01/12 01:21:33 1.109 +++ loncom/loncnew 2024/06/14 18:49:41 1.110 @@ -2,7 +2,7 @@ # The LearningOnline Network with CAPA # lonc maintains the connections to remote computers # -# $Id: loncnew,v 1.109 2020/01/12 01:21:33 raeburn Exp $ +# $Id: loncnew,v 1.110 2024/06/14 18:49:41 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -97,7 +97,8 @@ my $executable = $0; # Get the full my $RemoteHost; # Hostname of host child is talking to. my $RemoteHostId; # lonid of host child is talking to. my $RemoteDefHostId; # default lonhostID of host child is talking to. -my $RemoteLoncapaRev; # LON-CAPA version of host child is talking to. +my $RemoteLoncapaRev; # LON-CAPA version of host child is talking to, + # if 2.12.0 or newer, format: X.Y.Z my @all_host_ids; my $UnixSocketDir= $perlvar{'lonSockDir'}; my $IdleConnections = Stack->new(); # Set of idle connections @@ -1931,9 +1932,13 @@ sub get_remote_hostname { &Debug(5,"Creating child for $data (parent_client_connection)"); (my $hostname,my $lonid,@all_host_ids) = split(':',$data); + my $remotelcrev; + if ((scalar(@all_host_ids) > 1) && ($all_host_ids[0] =~ /^\d+\.\d+\.[\w.]+$/)) { + $remotelcrev = shift(@all_host_ids); + } $ChildHost{$hostname}++; if ($ChildHost{$hostname} == 1) { - &CreateChild($hostname,$lonid,$all_host_ids[-1]); + &CreateChild($hostname,$lonid,$all_host_ids[-1],$remotelcrev); } else { &Log('WARNING',"Request for a second child on $hostname"); }