1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

be more strict when parsing the configuration file

This commit is contained in:
Steffen Vogel 2019-03-23 20:50:19 +01:00
parent 4dbc885852
commit 40f91ad46a
2 changed files with 2 additions and 2 deletions

View file

@ -179,7 +179,7 @@ void SuperNode::parseJson(json_t *j)
idleStop = true;
ret = json_unpack_ex(j, &err, 0, "{ s?: o, s?: o, s?: o, s?: o, s?: i, s?: i, s?: i, s?: s, s?: b }",
ret = json_unpack_ex(j, &err, JSON_STRICT, "{ s?: o, s?: o, s?: o, s?: o, s?: i, s?: i, s?: i, s?: s, s?: b }",
"http", &json_web,
"logging", &json_logging,
"nodes", &json_nodes,

View file

@ -207,7 +207,7 @@ int Web::parse(json_t *cfg)
const char *htd = nullptr;
json_error_t err;
ret = json_unpack_ex(cfg, &err, 0, "{ s?: s, s?: s, s?: s, s?: i, s?: b }",
ret = json_unpack_ex(cfg, &err, JSON_STRICT, "{ s?: s, s?: s, s?: s, s?: i, s?: b }",
"ssl_cert", &cert,
"ssl_private_key", &pkey,
"htdocs", &htd,