From 4a37491645f5c5f66bce74b7cab222123d129d61 Mon Sep 17 00:00:00 2001 From: 4quarks <47900195+4quarks@users.noreply.github.com> Date: Thu, 9 Jun 2022 17:56:09 +0200 Subject: [PATCH] Correct hostname retrieval from Source::getHostname --- Utilities/XrdAdaptor/src/XrdSource.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utilities/XrdAdaptor/src/XrdSource.cc b/Utilities/XrdAdaptor/src/XrdSource.cc index b0264c1d4b324..31297459dad6a 100644 --- a/Utilities/XrdAdaptor/src/XrdSource.cc +++ b/Utilities/XrdAdaptor/src/XrdSource.cc @@ -219,7 +219,7 @@ Source::Source(timespec now, std::unique_ptr<XrdCl::File> fh, const std::string } bool Source::getHostname(const std::string &id, std::string &hostname) { - size_t pos = id.find(':'); + size_t pos = id.find_last_of(':'); hostname = id; if ((pos != std::string::npos) && (pos > 0)) { hostname = id.substr(0, pos);