*
*******************************************************************/
+#include <unistd.h> // cloase, usleep
+
#include <cerrno>
#include <csignal>
#include <cstdio> // snprintf
state = confHdr;
return ENODATA;
}
-currAdmin.SetAdminIP(adminIP);
+currAdmin->SetIP(adminIP);
adminLogin = login;
state = confLoginCipher;
return 0;
total += ret;
}
-if (currAdmin.GetLogin() == "")
+if (currAdmin->GetLogin() == "")
{
state = confHdr;
return ENODATA;
}
-EnDecodeInit(currAdmin.GetPassword().c_str(), ADM_PASSWD_LEN, &ctx);
+EnDecodeInit(currAdmin->GetPassword().c_str(), ADM_PASSWD_LEN, &ctx);
for (int i = 0; i < ADM_LOGIN_LEN/8; i++)
{
return 0;
}
-if (strncmp(currAdmin.GetLogin().c_str(), login, ADM_LOGIN_LEN) != 0)
+if (strncmp(currAdmin->GetLogin().c_str(), login, ADM_LOGIN_LEN) != 0)
{
state = confHdr;
return ENODATA;
requestList.clear();
BLOWFISH_CTX ctx;
-EnDecodeInit(currAdmin.GetPassword().c_str(), ADM_PASSWD_LEN, &ctx);
+EnDecodeInit(currAdmin->GetPassword().c_str(), ADM_PASSWD_LEN, &ctx);
while (1)
{
int k = 0;
int ret = 0;
-EnDecodeInit(currAdmin.GetPassword().c_str(), ADM_PASSWD_LEN, &ctx);
+EnDecodeInit(currAdmin->GetPassword().c_str(), ADM_PASSWD_LEN, &ctx);
while (li != answerList.end())
{
}
}
k = 0;// new node
- li++;
+ ++li;
}
if (answerList.empty()) {