Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[XrdTpc] Fix order of chaining when parsing xrootd.fslib. #783

Merged
merged 1 commit into from
Aug 8, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 18 additions & 4 deletions src/XrdTpc/XrdTpcConfigure.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,33 @@ bool TPCHandler::ConfigureFSLib(XrdOucStream &Config, std::string &path1, bool &
path2 = val;
}
if (!(val = Config.GetWord()) || !strcmp("default", val)) {
if (path2 == "libXrdThrottle.so") {
// There is not a second path specified or we requested the default path.
// Configuration of the form "xrootd.fslib /some/path.so"
// or "xrootd.fslib /some/path.so default"
if ((path2 == "libXrdThrottle.so") || val) {
// Default path specified as base or no default path specified, but chaining
// with the throttle plugin.
// Configuration of the form "xrootd.fslib throttle"
// or "xrootd.fslib throttle default"
path1 = "default";
} else if (!path2.empty()) {
} else {
// Only one path was specified - only load base.
// Configuration of the form "xrootd.fslib /some/base_path.so"
path1 = path2;
path2 = "";
path1_alt = path2_alt;
}
} else if (!strcmp("-2", val)) {
// Configuration of the form "xrootd.fslib /some/path.so -2 /some/base_path.so"
path1_alt = true;
if (!(val = Config.GetWord())) {
m_log.Emsg("Config", "fslib base library not specified");
return false;
}
path1 = val;
} else {
path2 = val;
// Configuration of the form "xrootd.fslib /some/path.so /some/base_path.so"
path1 = val;
}
return true;
}
Expand All @@ -111,7 +122,10 @@ bool TPCHandler::Configure(const char *configfn, XrdOucEnv *myEnv)
m_log.Emsg("Config", "Failed to parse the xrootd.fslib directive");
return false;
}
m_log.Emsg("Config", "xrootd.fslib line successfully processed by TPC handler/");
m_log.Emsg("Config", "xrootd.fslib line successfully processed by TPC handler. Base library:", path1.c_str());
if (path2.size()) {
m_log.Emsg("Config", "Chained library:", path2.c_str());
}
} else if (!strcmp("http.desthttps", val)) {
if (!(val = Config.GetWord())) {
Config.Close();
Expand Down