X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/99090ca5351c98fd9ce9773456a8a3c3936e8c60..6fb862fed3cab6d35cf42291dca84f0ab34d90a7:/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."; }