X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/d3819ef7b806ccd92a767ec4bb43e0388f879216..198f8204d13f3f0661233d910f474775a68a7337:/stglibs/srvconf.lib/netunit.cpp diff --git a/stglibs/srvconf.lib/netunit.cpp b/stglibs/srvconf.lib/netunit.cpp index 9a653d5b..eab32e6a 100644 --- a/stglibs/srvconf.lib/netunit.cpp +++ b/stglibs/srvconf.lib/netunit.cpp @@ -25,15 +25,17 @@ */ //--------------------------------------------------------------------------- -#include -#include -#include + +#include "stg/netunit.h" +#include "stg/common.h" #include +#include #include -#include "stg/netunit.h" -#include "stg/common.h" +#include +#include +#include //--------------------------------------------------------------------------- @@ -212,6 +214,7 @@ int ret; ret = recv(outerSocket, buffer, strlen(OK_HEADER), 0); if (ret <= 0) { + printf("Receive header answer error: '%s'\n", strerror(errno)); errorMsg = RECV_HEADER_ANSWER_ERROR; return st_recv_fail; } @@ -261,6 +264,7 @@ int ret; ret = recv(outerSocket, buffer, strlen(OK_LOGIN), 0); if (ret <= 0) { + printf("Receive login answer error: '%s'\n", strerror(errno)); errorMsg = RECV_LOGIN_ANSWER_ERROR; return st_recv_fail; } @@ -318,6 +322,7 @@ int ret; ret = recv(outerSocket, buffer, strlen(OK_LOGINS), 0); if (ret <= 0) { + printf("Receive secret login answer error: '%s'\n", strerror(errno)); errorMsg = RECV_LOGIN_ANSWER_ERROR; return st_recv_fail; } @@ -425,6 +430,7 @@ while (1) ret = recv(outerSocket, &bufferS[n++], 1, 0); if (ret <= 0) { + printf("Receive data error: '%s'\n", strerror(errno)); close(outerSocket); errorMsg = RECV_DATA_ANSWER_ERROR; return st_recv_fail; @@ -444,9 +450,7 @@ while (1) { if (RxCallBack) if (st_ok != RxCallBack(dataRxCallBack, &answerList)) - { return st_xml_parse_error; - } return st_ok; } }