38 #define ERRNOBASE 0x40000000
45 static const int errSlots = 144;
47 std::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;
72 free((
char*)Errno2String[EBADE -
ERRNOBASE]);
73 Errno2String[EBADE -
ERRNOBASE] =
"authentication failed - possible invalid exchange";
78 e2sMap[EBADE] =
"authentication failed - possible invalid exchange";
84 for (
int i = 1; i < lastGood; i++)
85 {
if (!Errno2String[i])
86 {snprintf(eBuff,
sizeof(eBuff),
"unknown error %d",
ERRNOBASE + i);
87 Errno2String[i] = strdup(eBuff);
93 Errno2String[0] =
"no error";
97 int maxErrno = initErrTable();
110 if (errcode == 0)
return Errno2String[0];
112 return Errno2String[errcode -
ERRNOBASE];
116 if (errcode < 0)
return "negative error";
122 std::string &eTxt = e2sMap[errcode];
124 {snprintf(eBuff,
sizeof(eBuff),
"unknown error %d", errcode);
125 eTxt = std::string(eBuff);
126 e2sMap[errcode] = eTxt;
const char * XrdSysE2T(int errcode)