#include <XrdCksConfig.hh>
Definition at line 43 of file XrdCksConfig.hh.
◆ XrdCksConfig()
XrdCksConfig::XrdCksConfig |
( |
const char * |
cFN, |
|
|
XrdSysError * |
Eroute, |
|
|
int & |
aOK, |
|
|
XrdVersionInfo & |
vInfo |
|
) |
| |
Definition at line 57 of file XrdCksConfig.cc.
59 : eDest(Eroute), cfgFN(cFN), CksLib(0), CksParm(0),
60 CksList(0), CksLast(0), LibList(0), LibLast(0),
67 if (vInfo.vNum <= 0 || vInfo.vNum == myVer.vNum
static bool VerCmp(XrdVersionInfo &vInf1, XrdVersionInfo &vInf2, bool noMsg=false)
XrdVERSIONINFODEF(myVersion, cmsclient, XrdVNUMBER, XrdVERSION)
References XrdSysPlugin::VerCmp(), and XrdCms::XrdVERSIONINFODEF().
◆ ~XrdCksConfig()
XrdCksConfig::~XrdCksConfig |
( |
| ) |
|
|
inline |
Definition at line 61 of file XrdCksConfig.hh.
62 if (CksLib) free(CksLib);
63 if (CksParm) free(CksParm);
64 while((tP = CksList)) {CksList = tP->
next;
delete tP;}
65 while((tP = LibList)) {LibList = tP->
next;
delete tP;}
References XrdOucTList::next.
◆ Configure()
XrdCks * XrdCksConfig::Configure |
( |
const char * |
dfltCalc = 0 , |
|
|
int |
rdsz = 0 , |
|
|
XrdOss * |
ossP = 0 , |
|
|
XrdOucEnv * |
envP = 0 |
|
) |
| |
Definition at line 116 of file XrdCksConfig.cc.
125 if (!myCks)
return 0;
129 myCks = addCks(myCks,
envP);
130 if (!myCks)
return 0;
134 while(tP) {NoGo |= myCks->
Config(
"ckslib", tP->
text); tP = tP->
next;}
138 if (!NoGo) NoGo = !myCks->
Init(cfgFN, dfltCalc);
142 if (NoGo) {
delete myCks; myCks = 0;}
virtual int Init(const char *ConfigFN, const char *DfltCalc=0)=0
virtual int Config(const char *Token, char *Line)=0
References XrdCks::Config(), XrdProxy::envP, XrdCks::Init(), XrdOucTList::next, XrdOfsPrepGPIReal::ossP, and XrdOucTList::text.
Referenced by XrdOfsConfigPI::Load().
◆ Manager() [1/2]
int XrdCksConfig::Manager |
( |
| ) |
|
|
inline |
◆ Manager() [2/2]
int XrdCksConfig::Manager |
( |
const char * |
Path, |
|
|
const char * |
Parms |
|
) |
| |
Definition at line 193 of file XrdCksConfig.cc.
197 if (CksLib) free(CksLib);
198 CksLib = strdup(
Path);
199 if (CksParm) free(CksParm);
200 CksParm = (Parms && *Parms ? strdup(Parms) : 0);
References Path.
◆ ManLib()
const char* XrdCksConfig::ManLib |
( |
| ) |
|
|
inline |
◆ ParseLib()
int XrdCksConfig::ParseLib |
( |
XrdOucStream & |
Config, |
|
|
int & |
libType |
|
) |
| |
Definition at line 220 of file XrdCksConfig.cc.
223 static const int pathSize = MAXPATHLEN;
224 static const int parmSize = 1024;
226 char *val, buff[nameSize + pathSize + parmSize + 8], parms[parmSize], *bP;
231 if (!(val =
Config.GetWord()) || !val[0])
232 {eDest->
Emsg(
"Config",
"ckslib digest not specified");
return 1;}
235 {eDest->
Emsg(
"Config",
"ckslib digest name too long -", val);
return 1;}
240 if (!(val =
Config.GetWord()) || !val[0])
241 {eDest->
Emsg(
"Config",
"ckslib path not specified for", buff);
return 1;}
244 {eDest->
Emsg(
"Config",
"ckslib path name too long -", val);
return 1;}
245 strcpy(bP, val); bP += n;
250 if (!
Config.GetRest(parms, parmSize))
251 {eDest->
Emsg(
"Config",
"ckslib parameters too long for", buff);
return 1;}
255 if ((*buff ==
'*' || *buff ==
'=') && *(buff+1) ==
' ')
256 {libType = (*buff ==
'*' ? -1 : 1);
262 n = (strncmp(buff,
"++ ", 3) ? 0 : 3);
263 *bP =
' '; strcpy(bP+1, parms);
269 {n = (bP - buff) - n;
271 tP->val = (*parms ? n+1 : 0);
272 if (LibLast) LibLast->
next = tP;
276 if (CksLast) CksLast->
next = tP;
static const int NameSize
static void toLower(char *str)
int Emsg(const char *esfx, int ecode, const char *text1, const char *text2=0)
References XrdCms::Config, XrdSysError::Emsg(), Manager(), XrdCksData::NameSize, XrdOucTList::next, XrdOucTList::text, and XrdOucUtils::toLower().
Referenced by XrdOfsConfigPI::Parse().
The documentation for this class was generated from the following files: