X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/175f44511b8b3cf327e4ed9268420e423229691a..9dc2984179d989f8774ea7ff6d72c81d376b5a2c:/projects/stargazer/plugins/configuration/sgconfig/parser.cpp diff --git a/projects/stargazer/plugins/configuration/sgconfig/parser.cpp b/projects/stargazer/plugins/configuration/sgconfig/parser.cpp index 52c0ea9b..b984adf6 100644 --- a/projects/stargazer/plugins/configuration/sgconfig/parser.cpp +++ b/projects/stargazer/plugins/configuration/sgconfig/parser.cpp @@ -20,36 +20,28 @@ #include "parser.h" -#include "stg/tariffs.h" -#include "stg/admin.h" -#include "stg/users.h" -#include "stg/user_property.h" -#include "stg/settings.h" -#include "stg/logger.h" -#include "stg/version.h" -#include "stg/store.h" - #include -#include // sprintf //----------------------------------------------------------------------------- // BASE PARSER //----------------------------------------------------------------------------- -int BASE_PARSER::Start(void *, const char *el, const char **) +int BASE_PARSER::Start(void *, const char * el, const char **) { -if (strcasecmp(el, tag.c_str()) == 0) - return 0; + if (strcasecmp(el, m_tag.c_str()) == 0) + return 0; -return -1; + return -1; } //----------------------------------------------------------------------------- -int BASE_PARSER::End(void *, const char *el) +int BASE_PARSER::End(void *, const char * el) { -if (strcasecmp(el, tag.c_str()) == 0) + if (m_depth == 1) { - CreateAnswer(); - return 0; + if (strcasecmp(el, m_tag.c_str()) != 0) + return -1; + CreateAnswer(); } -return -1; + --m_depth; + return 0; }