From: Maxim Mamontov Date: Fri, 10 Oct 2014 19:57:09 +0000 (+0300) Subject: Removed unexpected printf from servconf library. X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/8f8cc12362a05f4163db159c40579745b4b7aba6?ds=sidebyside;hp=6aadaaf234bfd8129e8b4ff7f64c3aef8df54659 Removed unexpected printf from servconf library. --- diff --git a/stglibs/srvconf.lib/netunit.cpp b/stglibs/srvconf.lib/netunit.cpp index 42b301a5..24d7ae77 100644 --- a/stglibs/srvconf.lib/netunit.cpp +++ b/stglibs/srvconf.lib/netunit.cpp @@ -27,7 +27,6 @@ #include // std::min -#include #include #include #include @@ -233,7 +232,6 @@ char buffer[sizeof(STG_HEADER) + 1]; 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; } @@ -274,7 +272,6 @@ char buffer[sizeof(OK_LOGIN) + 1]; 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; } @@ -317,7 +314,6 @@ char buffer[sizeof(OK_LOGINS) + 1]; 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; } @@ -360,7 +356,6 @@ while (!state.final) 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; } diff --git a/stglibs/srvconf.lib/parsers/get_service.cpp b/stglibs/srvconf.lib/parsers/get_service.cpp index f6de8e51..e9949cbc 100644 --- a/stglibs/srvconf.lib/parsers/get_service.cpp +++ b/stglibs/srvconf.lib/parsers/get_service.cpp @@ -94,8 +94,6 @@ if (strcasecmp(el, "service") == 0) error = std::string("Invalid parameter '") + *pos + "' or value '" + *(pos + 1) + "'."; break; } - else - printfd(__FILE__, "Parsed '%s' successfully.\n", *pos); } } else diff --git a/stglibs/srvconf.lib/servconf.cpp b/stglibs/srvconf.lib/servconf.cpp index 71d36a7b..046190ee 100644 --- a/stglibs/srvconf.lib/servconf.cpp +++ b/stglibs/srvconf.lib/servconf.cpp @@ -111,7 +111,6 @@ if (XML_Parse(sc->parser, chunk.c_str(), chunk.length(), final) == XML_STATUS_ER static_cast(XML_GetCurrentLineNumber(sc->parser)), static_cast(XML_GetCurrentColumnNumber(sc->parser)), XML_ErrorString(XML_GetErrorCode(sc->parser)), (int)final); - printf("%s\n", sc->errorMsg.c_str()); return false; }