38#define ERRNOBASE 0x40000000
45static const int errSlots = 144;
47std::map<int, std::string> e2sMap;
48 const char* Errno2String[errSlots] = {0};
52 char *eTxt, eBuff[80];
57 for(
int i = 1; i < errSlots; i++)
60 { eTxt = strdup(eTxt);
61 *eTxt = tolower(*eTxt);
62 Errno2String[i] = eTxt;
70 if (Errno2String[EBADE]) {
71 free((
char*)Errno2String[EBADE]);
74 Errno2String[EBADE] =
"authentication failed - possible invalid exchange";
79 for (
int i = 1; i < lastGood; i++)
80 {
if (!Errno2String[i])
81 {snprintf(eBuff,
sizeof(eBuff),
"unknown error %d",
ERRNOBASE + i);
82 Errno2String[i] = strdup(eBuff);
88 Errno2String[0] =
"no error";
92int maxErrno = initErrTable();
105 if (errcode == 0)
return Errno2String[0];
107 return Errno2String[errcode -
ERRNOBASE];
111 if (errcode < 0)
return "negative error";
117 std::string &eTxt = e2sMap[errcode];
119 {snprintf(eBuff,
sizeof(eBuff),
"unknown error %d", errcode);
120 eTxt = std::string(eBuff);
121 e2sMap[errcode] = eTxt;
const char * XrdSysE2T(int errcode)