Skip to content

Commit

Permalink
dcache-xrootd: update protocol version numbers
Browse files Browse the repository at this point in the history
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
  • Loading branch information
alrossi committed Oct 16, 2019
1 parent 601e1cb commit 00b2df8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Expand Up @@ -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;
Expand All @@ -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";

Expand Down
Expand Up @@ -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<InetSocketAddress>
{
Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit 00b2df8

Please sign in to comment.