From 2e37467d5d44bcce21459ec6a68506ee3b02d8c5 Mon Sep 17 00:00:00 2001
From: Gerardo Ganis <Gerardo.Ganis@cern.ch>
Date: Thu, 10 Apr 2008 13:49:58 +0000
Subject: [PATCH]    Save the remote protocol number in the physical connection
 so it is available    for each logical connection using it.

git-svn-id: http://root.cern.ch/svn/root/trunk@23119 27541ba8-7e3a-0410-8455-c3a389f83636
---
 proof/proofd/src/XrdProofConn.cxx | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/proof/proofd/src/XrdProofConn.cxx b/proof/proofd/src/XrdProofConn.cxx
index db6fd04dbb1..25326873c2d 100644
--- a/proof/proofd/src/XrdProofConn.cxx
+++ b/proof/proofd/src/XrdProofConn.cxx
@@ -306,6 +306,11 @@ int XrdProofConn::Connect()
    fPhyConn = fgConnMgr->GetConnection(fLogConnID)->GetPhyConnection();
    fConnected = 1;
 
+   // Fill in the remote protocol: either it was received during handshake
+   // or it was saved in the underlying physical connection
+   if (fRemoteProtocol < 0)
+      fRemoteProtocol = fPhyConn->fServerProto;
+
    // Handle asynchronous requests
    SetAsync(fUnsolMsgHandler);
 
@@ -846,6 +851,8 @@ XrdProofConn::ESrvType XrdProofConn::DoHandShake()
       XPD::ServerInitHandShake2HostFmt(&xbody);
 
       fRemoteProtocol = xbody.protover;
+      if (fPhyConn->fServerProto <= 0)
+         fPhyConn->fServerProto = fRemoteProtocol;
 
       return kSTXProofd;
 
-- 
GitLab