X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/2da962edada912d8081f7e15db0ac887b98b179e..43fff4a2cf7da8c3a5c24633d998bf52f9cf12a2:/stglibs/srvconf.lib/parsers/get_user.cpp diff --git a/stglibs/srvconf.lib/parsers/get_user.cpp b/stglibs/srvconf.lib/parsers/get_user.cpp index e1f06e8b..54cfc0f9 100644 --- a/stglibs/srvconf.lib/parsers/get_user.cpp +++ b/stglibs/srvconf.lib/parsers/get_user.cpp @@ -41,10 +41,10 @@ if (!attr) std::map props; for (size_t i = 0; i < DIR_NUM; ++i) { - props.insert(std::pair("su" + x2str(i), &value.su[i])); - props.insert(std::pair("sd" + x2str(i), &value.sd[i])); - props.insert(std::pair("mu" + x2str(i), &value.mu[i])); - props.insert(std::pair("md" + x2str(i), &value.md[i])); + props.insert(std::pair("su" + unsigned2str(i), &value.su[i])); + props.insert(std::pair("sd" + unsigned2str(i), &value.sd[i])); + props.insert(std::pair("mu" + unsigned2str(i), &value.mu[i])); + props.insert(std::pair("md" + unsigned2str(i), &value.md[i])); } size_t pos = 0; while (attr[pos]) @@ -90,7 +90,7 @@ GET_USER::PARSER::PARSER(CALLBACK f, void * d) AddParser(propertyParsers, "traff", info.stat); for (size_t i = 0; i < USERDATA_NUM; ++i) - AddParser(propertyParsers, "userData" + x2str(i), info.userData[i], GetEncodedValue); + AddParser(propertyParsers, "userData" + unsigned2str(i), info.userData[i], GetEncodedValue); } //----------------------------------------------------------------------------- GET_USER::PARSER::~PARSER() @@ -127,6 +127,7 @@ if (depth == 0 && parsingAnswer) void GET_USER::PARSER::ParseUser(const char * el, const char ** attr) { if (strcasecmp(el, "user") == 0) + { if (attr && attr[0] && attr[1]) { if (strcasecmp(attr[1], "error") == 0) @@ -141,6 +142,7 @@ if (strcasecmp(el, "user") == 0) } else parsingAnswer = true; + } } //----------------------------------------------------------------------------- void GET_USER::PARSER::ParseUserParams(const char * el, const char ** attr)