diff --git a/cmdline/CtaAdminCmd.cpp b/cmdline/CtaAdminCmd.cpp index 66064a98aebf77981b4f86a71e146119b7fbfb57..57ea20489d1708bbb2ae7e1119089c0121f9c7aa 100644 --- a/cmdline/CtaAdminCmd.cpp +++ b/cmdline/CtaAdminCmd.cpp @@ -290,17 +290,15 @@ void CtaAdminCmd::throwUsage(const std::string &error_txt) const { // Command has been set: show command-specific help - help << m_execname << ' '; - - // Reverse lookup of subcommand + // Reverse lookup of long command name + std::string longcmd; for(auto map_it = cmdLookup.begin(); map_it != cmdLookup.end(); ++map_it) { - if(admincmd == map_it->second) { - help << map_it->first << ' '; - break; + if(admincmd == map_it->second && map_it->first.length() > longcmd.length()) { + longcmd = map_it->first; } } - help << cmdHelp.at(admincmd).help(); + help << m_execname << ' ' << longcmd << cmdHelp.at(admincmd).help(); } throw std::runtime_error(help.str()); diff --git a/xroot_ssi_pb/XrdSsiPbService.hpp b/xroot_ssi_pb/XrdSsiPbService.hpp index ed9812d5b7bf2285680f0307596ee35bab46c8c3..c3b6894c56da319ea37261b45ec3fee99803c92e 100644 --- a/xroot_ssi_pb/XrdSsiPbService.hpp +++ b/xroot_ssi_pb/XrdSsiPbService.hpp @@ -87,8 +87,6 @@ public: << (resource.rOpts & XrdSsiResource::Reusable ? "Resuable " : "") << (resource.rOpts & XrdSsiResource::Discard ? "Discard" : "") << std::endl; - - resource.client->name = "ctadev"; #endif if(resource.client == nullptr || resource.client->name == nullptr) { @@ -97,6 +95,10 @@ public: return false; } +#ifdef XRDSSI_DEBUG + std::cerr << "[DEBUG] Resource client name: " << resource.client->name << std::endl; +#endif + return true; }