Skip to content
Snippets Groups Projects
Commit a6d4b489 authored by Michael Davis's avatar Michael Davis
Browse files

[cta_eos] Change checksum to upper case and prepend 0X

parent 90deda72
No related branches found
No related tags found
No related merge requests found
......@@ -38,7 +38,7 @@ find_package(cryptopp REQUIRED)
include_directories(${PROTOBUF3_INCLUDE_DIRS} ${XROOTD_INCLUDE_DIR} ${XROOTD_INCLUDE_DIR}/private ../xroot_ssi_pb)
add_executable(eoscta_stub EosCtaStub.cpp Configuration.cpp)
target_link_libraries(eoscta_stub cryptopp XrdCtaMessages XrdSsi-4 XrdSsiLib)
target_link_libraries(eoscta_stub cryptopp ctacommon XrdCtaMessages XrdSsi-4 XrdSsiLib)
set_property (TARGET eoscta_stub APPEND PROPERTY INSTALL_RPATH ${PROTOBUF3_RPATH})
# Get some extra debug messages on stdout
target_compile_definitions(eoscta_stub PUBLIC XRDSSI_DEBUG)
......
......@@ -23,6 +23,7 @@
#include <cryptopp/base64.h>
#include "common/dataStructures/FrontendReturnCode.hpp"
#include "common/utils/utils.hpp"
#include "cmdline/Configuration.hpp"
#include "xroot_plugins/messages/CtaFrontendApi.hpp"
......@@ -231,7 +232,11 @@ void fillNotification(cta::eos::Notification &notification, bool &isStderr, bool
else if(argstr == "--diskfilegroup") notification.mutable_file()->mutable_owner()->set_groupname(argval);
else if(argstr == "--size") notification.mutable_file()->set_size(std::stoi(argval));
else if(argstr == "--checksumtype") notification.mutable_file()->mutable_cks()->set_name(argval);
else if(argstr == "--checksumvalue") notification.mutable_file()->mutable_cks()->set_value(argval);
else if(argstr == "--checksumvalue") {
std::string checksumvalue("0X" + argval);
cta::utils::toUpper(checksumvalue);
notification.mutable_file()->mutable_cks()->set_value(checksumvalue);
}
else if(argstr == "--diskfilepath") notification.mutable_file()->set_lpath(argval);
else if(argstr == "--storageclass") {
google::protobuf::MapPair<std::string,std::string> sc("CTA_StorageClass", argval);
......
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