#include <algorithm> // std::min
-#include <cstdio>
#include <cerrno>
#include <cstring>
#include <cassert>
if (!ReadAll(sock, buffer, strlen(OK_HEADER)))
{
- printf("Receive header answer error: '%s'\n", strerror(errno));
errorMsg = RECV_HEADER_ANSWER_ERROR;
return st_recv_fail;
}
if (!ReadAll(sock, buffer, strlen(OK_LOGIN)))
{
- printf("Receive login answer error: '%s'\n", strerror(errno));
errorMsg = RECV_LOGIN_ANSWER_ERROR;
return st_recv_fail;
}
if (!ReadAll(sock, buffer, strlen(OK_LOGINS)))
{
- printf("Receive secret login answer error: '%s'\n", strerror(errno));
errorMsg = RECV_LOGIN_ANSWER_ERROR;
return st_recv_fail;
}
ssize_t res = read(sock, buffer, sizeof(buffer));
if (res < 0)
{
- printf("Receive data error: '%s'\n", strerror(errno));
errorMsg = RECV_DATA_ANSWER_ERROR;
return st_recv_fail;
}
static_cast<int>(XML_GetCurrentLineNumber(sc->parser)),
static_cast<int>(XML_GetCurrentColumnNumber(sc->parser)),
XML_ErrorString(XML_GetErrorCode(sc->parser)), (int)final);
- printf("%s\n", sc->errorMsg.c_str());
return false;
}