Commit 1712fee0 authored by Elvin Sindrilaru's avatar Elvin Sindrilaru
Browse files

XROOTD: Adapt to XRootD 4.1 API

parent e13c47dc
......@@ -70,9 +70,10 @@ const int XrdxCastor2OfsFile::sKeyExpiry = 60;
//------------------------------------------------------------------------------
extern "C"
{
XrdSfsFileSystem* XrdSfsGetFileSystem(XrdSfsFileSystem* native_fs,
XrdSfsFileSystem* XrdSfsGetFileSystem2(XrdSfsFileSystem* native_fs,
XrdSysLogger* lp,
const char* configfn)
const char* configfn,
XrdOucEnv* envP)
{
static XrdxCastor2Ofs myFS;
// Do the herald thing
......@@ -84,7 +85,7 @@ extern "C"
gSrv = &myFS;
gSrv->ConfigFN = (configfn && *configfn ? strdup(configfn) : 0);
if (gSrv->Configure(OfsEroute)) return 0;
if (gSrv->Configure(OfsEroute, envP)) return 0;
// All done, we can return the callout vector to these routines
XrdOfsFS = static_cast<XrdOfs*>(gSrv);
......@@ -110,7 +111,7 @@ XrdxCastor2Ofs::XrdxCastor2Ofs():
//------------------------------------------------------------------------------
// Configure
//------------------------------------------------------------------------------
int XrdxCastor2Ofs::Configure(XrdSysError& Eroute)
int XrdxCastor2Ofs::Configure(XrdSysError& Eroute, XrdOucEnv* envP)
{
char* var;
const char* val;
......@@ -195,7 +196,7 @@ int XrdxCastor2Ofs::Configure(XrdSysError& Eroute)
Logging::SetUnit(unit.c_str());
xcastor_info("logging configured");
// Parse the default XRootD directives
int rc = XrdOfs::Configure(Eroute);
int rc = XrdOfs::Configure(Eroute, envP);
// Set the effective user for all the XrdClients used to issue 'prepares'
// to redirector
setenv("XrdClientEUSER", "stage", 1);
......
......@@ -244,8 +244,13 @@ class XrdxCastor2Ofs : public XrdOfs, public LogId
//----------------------------------------------------------------------------
//! Configure function - parse the xrd.cf.server file
//!
//! @param error error object
//! @param envP env holding implementation specific information
//!
//! @return SFS_OK if successful, otherwise SFS_ERROR
//----------------------------------------------------------------------------
int Configure(XrdSysError& error);
int Configure(XrdSysError& error, XrdOucEnv* envP);
//----------------------------------------------------------------------------
......
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