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