git.stg.codes
/
stg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ticket 12. The 'stopOnError' property added in the SETTINGS_IMPL class.
[stg.git]
/
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 6f98fc23fe2f5a04cf3d244a2584cde23ab0e45a..e9949cbc4659ca9b8a8c4ce15699943dd19a34f4 100644
(file)
--- a/
stglibs/srvconf.lib/parsers/get_service.cpp
+++ b/
stglibs/srvconf.lib/parsers/get_service.cpp
@@
-54,8
+54,8
@@
depth++;
if (depth == 1)
ParseService(el, attr);
if (depth == 1)
ParseService(el, attr);
-if (depth == 2 && parsingAnswer)
- ParseServiceParams(el, attr);
+
/*
if (depth == 2 && parsingAnswer)
+ ParseServiceParams(el, attr);
*/
return 0;
}
return 0;
}
@@
-86,15
+86,23
@@
if (strcasecmp(el, "service") == 0)
error = "Service not found.";
}
else
error = "Service not found.";
}
else
+ {
parsingAnswer = true;
parsingAnswer = true;
+ for (const char ** pos = attr; *pos != NULL; pos = pos + 2)
+ if (!TryParse(propertyParsers, ToLower(*pos), pos, encoding, *pos))
+ {
+ error = std::string("Invalid parameter '") + *pos + "' or value '" + *(pos + 1) + "'.";
+ break;
+ }
+ }
}
else
parsingAnswer = true;
}
}
//-----------------------------------------------------------------------------
}
else
parsingAnswer = true;
}
}
//-----------------------------------------------------------------------------
-void GET_SERVICE::PARSER::ParseServiceParams(const char * el, const char ** attr)
+
/*
void GET_SERVICE::PARSER::ParseServiceParams(const char * el, const char ** attr)
{
if (!TryParse(propertyParsers, ToLower(el), attr, encoding))
error = "Invalid parameter.";
{
if (!TryParse(propertyParsers, ToLower(el), attr, encoding))
error = "Invalid parameter.";
-}
+}
*/