Skip to content

Commit

Permalink
Correct hostname retrieval from Source::getHostname
Browse files Browse the repository at this point in the history
  • Loading branch information
4quarks committed Jun 9, 2022
1 parent 09a3567 commit 4a37491
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 4a37491

Please sign in to comment.