X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/6c3114a1ec31d54d935f4d8395ef4816ae250295..4db09e8becb88e960a88df066237223af573a335:/projects/stargazer/plugins/configuration/sgconfig/rsconf.cpp?ds=sidebyside diff --git a/projects/stargazer/plugins/configuration/sgconfig/rsconf.cpp b/projects/stargazer/plugins/configuration/sgconfig/rsconf.cpp index b4cbf544..c0b7b325 100644 --- a/projects/stargazer/plugins/configuration/sgconfig/rsconf.cpp +++ b/projects/stargazer/plugins/configuration/sgconfig/rsconf.cpp @@ -26,7 +26,7 @@ * *******************************************************************/ -#include // cloase, usleep +#include // close #include #include @@ -250,7 +250,7 @@ while (pos < stgHdrLen) return -1; } int ret = recv(sock, &buf[pos], stgHdrLen - pos, 0); - if (ret < 0) + if (ret <= 0) { state = confHdr; return -1; @@ -310,7 +310,7 @@ while (pos < ADM_LOGIN_LEN) { int ret = recv(sock, &login[pos], ADM_LOGIN_LEN - pos, 0); - if (ret < 0) + if (ret <= 0) { // Error in network state = confHdr; @@ -359,7 +359,7 @@ while (pos < ADM_LOGIN_LEN) int ret = recv(sock, &loginS[pos], ADM_LOGIN_LEN - pos, 0); - if (ret < 0) + if (ret <= 0) { // Network error printfd(__FILE__, "recv error: '%s'\n", strerror(errno));