X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/01cdd74060b063287784d3aff7f9f861a404b789..8c6fa3fbaccc22127280bf77a48fab5a3ee0716e:/stglibs/srvconf.lib/parsers/get_admin.cpp?ds=sidebyside diff --git a/stglibs/srvconf.lib/parsers/get_admin.cpp b/stglibs/srvconf.lib/parsers/get_admin.cpp index 8f775d06..9f4ec5d4 100644 --- a/stglibs/srvconf.lib/parsers/get_admin.cpp +++ b/stglibs/srvconf.lib/parsers/get_admin.cpp @@ -39,15 +39,16 @@ bool GetValue(const char ** attr, PRIV & value, const std::string & attrNa uint32_t priv; if (!GetValue(attr, priv, attrName)) return false; -value = priv; +value = PRIV(priv); return true; } } // namespace STG -GET_ADMIN::PARSER::PARSER(CALLBACK f, void * d) +GET_ADMIN::PARSER::PARSER(CALLBACK f, void * d, const std::string & e) : callback(f), data(d), + encoding(e), depth(0), parsingAnswer(false) { @@ -104,7 +105,7 @@ if (strcasecmp(el, "admin") == 0) { parsingAnswer = true; for (const char ** pos = attr; *pos != NULL; pos = pos + 2) - if (!TryParse(propertyParsers, ToLower(*pos), pos, *pos)) + if (!TryParse(propertyParsers, ToLower(*pos), pos, encoding, *pos)) { error = std::string("Invalid parameter '") + *pos + "'."; break;