Commit 2152dd5e authored by Elvin Sindrilaru's avatar Elvin Sindrilaru
Browse files

XROOTD: For d2d/tape transfers which don't have a proper request id we generate

        a random ones using uuid.
parent 28e5f53d
......@@ -45,7 +45,7 @@ CastorSetLibraryVersions (xrdxcastor2fs)
set_property (TARGET xrdxcastor2fs
APPEND PROPERTY COMPILE_DEFINITIONS _FILE_OFFSET_BITS=64)
target_link_libraries (xrdxcastor2fs castorclient castorcommon castorns crypto
${XROOTD_XRDOFS_LIB} ${XROOTD_XRDUTILS_LIB})
${XROOTD_XRDOFS_LIB} ${XROOTD_XRDUTILS_LIB} ${UUID_LIB})
install (TARGETS xrdxcastor2fs DESTINATION ${CASTOR_DEST_LIB_DIR})
################################################################################
......
......@@ -26,6 +26,7 @@
#include <sstream>
#include <sys/types.h>
#include <sys/stat.h>
#include <uuid/uuid.h>
#include <grp.h>
#include <fcntl.h>
#include "h/Cns_api.h"
......@@ -928,7 +929,14 @@ XrdxCastor2OfsFile::ExtractTransferInfo(XrdOucEnv& env_opaque)
// plugin makes sure we only allow trusted hosts to do transfers - it
// verifies the signature.
xcastor_debug("no diskmanager opaque infomation - this is either a d2d "
"transfer or an rtcpd request");
"or a tape transfer");
// Use a random request id for d2d/tape transfers
uuid_t id;
uuid_generate(id);
char sid[100];
uuid_unparse(id, sid);
mReqId = sid;
return SFS_OK;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment