From 00b2df8fbd8045a22afec14155dfafb9fd9bc461 Mon Sep 17 00:00:00 2001 From: Albert Louis Rossi Date: Wed, 16 Oct 2019 12:28:08 -0500 Subject: [PATCH] dcache-xrootd: update protocol version numbers Motivation: The dCache xrootd door maintains a separate pair of constants defining protocol version. These should reflect the version of the library being used. Modification: Eliminate them and use the library version numbers. Result: Consistent with library and automatically updated when the library is. Target: master Request: 5.2 Request: 5.1 Request: 5.0 Patch: https://rb.dcache.org/r/11981 Acked-by: Vincent Acked-by: Lea Requires-book: no Requires-notes: yes --- .../src/main/java/org/dcache/xrootd/door/XrootdDoor.java | 7 +++---- .../main/java/org/dcache/xrootd/door/XrootdTransfer.java | 5 +++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/door/XrootdDoor.java b/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/door/XrootdDoor.java index 4ed5e17b18a..7bdc806416f 100644 --- a/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/door/XrootdDoor.java +++ b/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/door/XrootdDoor.java @@ -100,6 +100,7 @@ import org.dcache.vehicles.PnfsListDirectoryMessage; import org.dcache.vehicles.XrootdDoorAdressInfoMessage; import org.dcache.vehicles.XrootdProtocolInfo; +import org.dcache.xrootd.protocol.XrootdProtocol; import org.dcache.xrootd.tpc.XrootdTpcInfo; import org.dcache.xrootd.tpc.XrootdTpcInfoCleanerTask; import org.dcache.xrootd.util.FileStatus; @@ -123,12 +124,10 @@ public class XrootdDoor CellCommandListener, CellInfoProvider { public static final String XROOTD_PROTOCOL_STRING = "Xrootd"; - public static final int XROOTD_PROTOCOL_MAJOR_VERSION = 2; - public static final int XROOTD_PROTOCOL_MINOR_VERSION = 7; public static final String XROOTD_PROTOCOL_VERSION = String.format("%d.%d", - XROOTD_PROTOCOL_MAJOR_VERSION, - XROOTD_PROTOCOL_MINOR_VERSION); + XrootdProtocol.PROTOCOL_VERSION_MAJOR, + XrootdProtocol.PROTOCOL_VERSION_MINOR); private static final String TPC_PLACEMENT = "tpc-placement"; diff --git a/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/door/XrootdTransfer.java b/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/door/XrootdTransfer.java index 4c1b6b86601..7f4406963f7 100644 --- a/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/door/XrootdTransfer.java +++ b/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/door/XrootdTransfer.java @@ -14,6 +14,7 @@ import org.dcache.auth.attributes.Restriction; import org.dcache.util.RedirectedTransfer; import org.dcache.vehicles.XrootdProtocolInfo; +import org.dcache.xrootd.protocol.XrootdProtocol; public class XrootdTransfer extends RedirectedTransfer { @@ -44,8 +45,8 @@ public synchronized void setDoorAddress(InetSocketAddress doorAddress) { protected synchronized ProtocolInfo createProtocolInfo() { InetSocketAddress client = getClientAddress(); return new XrootdProtocolInfo(XrootdDoor.XROOTD_PROTOCOL_STRING, - XrootdDoor.XROOTD_PROTOCOL_MAJOR_VERSION, - XrootdDoor.XROOTD_PROTOCOL_MINOR_VERSION, + XrootdProtocol.PROTOCOL_VERSION_MAJOR, + XrootdProtocol.PROTOCOL_VERSION_MINOR, client, new CellPath(getCellName(), getDomainName()), getPnfsId(),