Skip to content

Commit

Permalink
Merge pull request #38309 from 4quarks/hostname_correct
Browse files Browse the repository at this point in the history
Correct hostname retrieval from Source::getHostname
  • Loading branch information
cmsbuild authored Jul 16, 2022
2 parents 2a0aaba + 213b684 commit 035f882
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Utilities/XrdAdaptor/src/XrdSource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 035f882

Please sign in to comment.