X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/b3139bf3f37b3b0244efea8b4b5e5a7d0bc90095..d1d65fe3185a6c2178bbca46e9f409bd8d747c7f:/stglibs/srvconf.lib/parsers/get_service.cpp diff --git a/stglibs/srvconf.lib/parsers/get_service.cpp b/stglibs/srvconf.lib/parsers/get_service.cpp index 105b7395..6f98fc23 100644 --- a/stglibs/srvconf.lib/parsers/get_service.cpp +++ b/stglibs/srvconf.lib/parsers/get_service.cpp @@ -28,14 +28,15 @@ using namespace STG; -GET_SERVICE::PARSER::PARSER(CALLBACK f, void * d) +GET_SERVICE::PARSER::PARSER(CALLBACK f, void * d, const std::string & e) : callback(f), data(d), + encoding(e), depth(0), parsingAnswer(false) { AddParser(propertyParsers, "name", info.name); - AddParser(propertyParsers, "comment", info.comment); + AddParser(propertyParsers, "comment", info.comment, GetEncodedValue); AddParser(propertyParsers, "cost", info.cost); AddParser(propertyParsers, "payDay", info.payDay); } @@ -94,6 +95,6 @@ if (strcasecmp(el, "service") == 0) //----------------------------------------------------------------------------- void GET_SERVICE::PARSER::ParseServiceParams(const char * el, const char ** attr) { -if (!TryParse(propertyParsers, ToLower(el), attr)) +if (!TryParse(propertyParsers, ToLower(el), attr, encoding)) error = "Invalid parameter."; }