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

feat: add json parsing of iplist

Signed-off-by: Pascal Bauer <pascal.bauer@rwth-aachen.de>
This commit is contained in:
Pascal Bauer 2024-10-31 11:44:12 +01:00 committed by Niklas Eiling
parent c577e8a2a1
commit d521b5567f

View file

@ -48,9 +48,10 @@ PCIeCardFactory::make(json_t *json_card, std::string card_name,
json_error_t err;
int ret = json_unpack_ex(
json_card, &err, 0, "{ s: o, s?: i, s?: b, s?: s, s?: s, s?: b, s?: o }",
json_card, &err, 0, "{ s: o, s?: i, s?: b, s?: s, s?: s, s?: b, s?: o, s?: o}",
"ips", &json_ips, "affinity", &affinity, "do_reset", &do_reset, "slot",
&pci_slot, "id", &pci_id, "polling", &polling, "paths", &json_paths);
&pci_slot, "id", &pci_id, "polling", &polling, "paths", &json_paths,
"ignore_ips", &ignored_ips_array);
if (ret != 0)
throw ConfigError(json_card, err, "", "Failed to parse card");