--- loncom/loncnew	2018/12/10 17:34:22	1.107
+++ loncom/loncnew	2018/12/14 02:05:38	1.108
@@ -2,7 +2,7 @@
 # The LearningOnline Network with CAPA
 # lonc maintains the connections to remote computers
 #
-# $Id: loncnew,v 1.107 2018/12/10 17:34:22 raeburn Exp $
+# $Id: loncnew,v 1.108 2018/12/14 02:05:38 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -97,6 +97,7 @@ 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 @all_host_ids;
 my $UnixSocketDir= $perlvar{'lonSockDir'};
 my $IdleConnections = Stack->new(); # Set of idle connections
@@ -671,7 +672,6 @@ Parameters:
 =item client  
  
    The LondTransaction we are failing.
- 
 
 =cut
 
@@ -1250,7 +1250,8 @@ sub MakeLondConnection {
     my $Connection = LondConnection->new(&GetServerHost(),
 					 &GetServerPort(),
 					 &GetHostId(),
-					 &GetDefHostId());
+					 &GetDefHostId(),
+					 &GetLoncapaRev());
 
     if($Connection eq undef) {
 	Log("CRITICAL","Failed to make a connection with lond.");
@@ -1575,6 +1576,18 @@ sub GetDefHostId {
 
 =pod
 
+=head2 GetLoncapaRev
+
+Returns the LON-CAPA version for the node whose lond we talk with.
+
+=cut
+
+sub GetLoncapaRev {
+    return $RemoteLoncapaRev;           # Setup by the fork.
+}
+
+=pod
+
 =head2 GetServerPort
 
 Returns the lond port number.
@@ -1836,7 +1849,7 @@ sub ChildProcess {
 #  Create a new child for host passed in:
 
 sub CreateChild {
-    my ($host, $hostid, $defhostid) = @_;
+    my ($host, $hostid, $defhostid, $loncaparev) = @_;
 
     my $sigset = POSIX::SigSet->new(SIGINT);
     sigprocmask(SIG_BLOCK, $sigset);
@@ -1852,6 +1865,7 @@ sub CreateChild {
     } else {			# child.
 	$RemoteHostId = $hostid;
 	$RemoteDefHostId = $defhostid;
+        $RemoteLoncapaRev = $loncaparev;
 	ShowStatus("Connected to ".$RemoteHost);
 	$SIG{INT} = 'DEFAULT';
 	sigprocmask(SIG_UNBLOCK, $sigset);