diff options
Diffstat (limited to 'cethcan/main.c')
-rw-r--r-- | cethcan/main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cethcan/main.c b/cethcan/main.c index 5bdca0a..cc3522b 100644 --- a/cethcan/main.c +++ b/cethcan/main.c @@ -7,7 +7,7 @@ int main(int argc, char **argv) int optch = 0; const char *cfgfile = "cethcan.json"; json_error_t je; - json_t *config, *ethercfg, *lightcfg, *socancfg; + json_t *config, *ethercfg, *lightcfg, *beancfg, *socancfg; do { optch = getopt(argc, argv, "c:"); @@ -54,6 +54,13 @@ int main(int argc, char **argv) return 1; } + beancfg = json_object_get(config, "beans"); + for (size_t i = 0; i < json_array_size(beancfg); i++) { + json_t *c = json_array_get(beancfg, i); + if (bean_init_conf(c)) + return 1; + } + socancfg = json_object_get(config, "socketcan"); for (size_t i = 0; i < json_array_size(socancfg); i++) { json_t *c = json_array_get(socancfg, i); |