X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/1b2ab8e6d556a8ed30d4feadc72263b3f4c86665..8f8cc12362a05f4163db159c40579745b4b7aba6:/stglibs/srvconf.lib/parsers/server_info.cpp?ds=sidebyside diff --git a/stglibs/srvconf.lib/parsers/server_info.cpp b/stglibs/srvconf.lib/parsers/server_info.cpp index fbefb2d4..22a0e43c 100644 --- a/stglibs/srvconf.lib/parsers/server_info.cpp +++ b/stglibs/srvconf.lib/parsers/server_info.cpp @@ -29,18 +29,10 @@ using namespace STG; -namespace -{ - -const size_t UNAME_LEN = 256; -const size_t SERV_VER_LEN = 64; -const size_t DIRNAME_LEN = 16; - -} - -SERVER_INFO::PARSER::PARSER(CALLBACK f, void * d) +SERVER_INFO::PARSER::PARSER(CALLBACK f, void * d, const std::string & e) : callback(f), data(d), + encoding(e), depth(0), parsingAnswer(false) { @@ -66,7 +58,7 @@ if (depth == 1) else { if (depth == 2 && parsingAnswer) - if (!TryParse(propertyParsers, ToLower(el), attr)) + if (!TryParse(propertyParsers, ToLower(el), attr, encoding)) error = "Invalid parameter."; } return 0;