Skip to content
Snippets Groups Projects
Commit 54f1b500 authored by Lasse Tjernaes Wardenaer's avatar Lasse Tjernaes Wardenaer
Browse files

Fix "hostName.empty()" bug and remove vid check

parent fb1f14e3
No related branches found
No related tags found
No related merge requests found
Pipeline #43017 failed
......@@ -7,6 +7,7 @@
### Bug fixes
- cta/CTA#93 - Refactor Frontend code to allow code sharing between SSI and gRPC implementations
- cta/CTA#221 - Change option in cta-send-event from instance to eos.instance
- cta/CTA#223 - Remove vid check to improve run time of cta-verify-file, fix possible _S_construct null not valid error
# v4.7.14-1
......
......@@ -83,24 +83,6 @@ void fillNotification(cta::eos::Notification &notification, const CmdLineArgs &c
}
}
/*
* Checks if the provided vid exists
*/
void vidExists(cta::cliTool::CmdLineArgs cmdLineArgs, const XrdSsiPb::Config &config) {
std::string hostName = std::getenv("HOSTNAME");
if(hostName.empty()) {
hostName = "UNKNOWN";
}
cta::log::StdoutLogger log(hostName, "cta-verify-file");
auto serviceProviderPtr = std::make_unique<XrdSsiPbServiceType>(config);
auto vidsInCatalogue = CatalogueFetch::getVids(serviceProviderPtr, log);
std::list<std::string>::iterator findIter = std::find(vidsInCatalogue.begin(), vidsInCatalogue.end(), cmdLineArgs.m_vid);
if(vidsInCatalogue.end() == findIter) {
throw std::runtime_error("The provided --vid does not exist in the Catalogue.");
}
}
XrdSsiPb::Config getConfig() {
// Set configuration options
XrdSsiPb::Config config(g_config_file, "cta");
......@@ -199,8 +181,6 @@ int exceptionThrowingMain(int argc, char *const *const argv)
const XrdSsiPb::Config config = getConfig();
vidExists(cmdLineArgs, config);
for(const auto &archiveFileId : archiveFileIds) {
sendVerifyRequest(cmdLineArgs, archiveFileId, config);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment