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

some refactoring

This commit is contained in:
Steffen Vogel 2017-07-02 23:58:56 +02:00
parent 0a79d48aac
commit 8287f049ef
3 changed files with 4 additions and 4 deletions

View file

@ -47,7 +47,7 @@ int shmem_parse(struct node *n, config_setting_t *cfg)
cerror(cfg, "Missing shared memory input queue name");
if (!config_setting_lookup_int(cfg, "queuelen", &shm->conf.queuelen))
shm->conf.queuelen = DEFAULT_SHMEM_QUEUELEN;
shm->conf.queuelen = MAX(DEFAULT_SHMEM_QUEUELEN, n->vectorize);
if (!config_setting_lookup_int(cfg, "samplelen", &shm->conf.samplelen))
shm->conf.samplelen = DEFAULT_SHMEM_SAMPLELEN;

View file

@ -95,7 +95,7 @@ int shmem_int_open(const char *wname, const char* rname, struct shmem_int *shm,
shared->polling = conf->polling;
ret = shared->polling ? queue_init(&shared->queue.q, conf->queuelen, manager)
: queue_signalled_init(&shared->queue.qs, conf->queuelen, manager);
: queue_signalled_init(&shared->queue.qs, conf->queuelen, manager);
if (ret) {
errno = ENOMEM;
return -1;

View file

@ -146,8 +146,8 @@ int super_node_parse_uri(struct super_node *sn, const char *uri)
error("Failed t convert JSON to configuration file");
}
else {
info("conf: %s in %s:%d", config_error_text(&sn->cfg), uri, config_error_line(&sn->cfg));
info("json: %s in %s:%d:%d", err.text, err.source, err.line, err.column);
warn("conf: %s in %s:%d", config_error_text(&sn->cfg), uri, config_error_line(&sn->cfg));
warn("json: %s in %s:%d:%d", err.text, err.source, err.line, err.column);
error("Failed to parse configuration");
}
}