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:
parent
4dbc885852
commit
40f91ad46a
2 changed files with 2 additions and 2 deletions
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue