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

path: run in single mode if possible to reduce syscall overhead

This commit is contained in:
Steffen Vogel 2019-02-12 18:18:02 +01:00
parent 0cbbd0a53c
commit 2cc6423c61

View file

@ -662,14 +662,8 @@ int path_parse(struct path *p, json_t *cfg, struct vlist *nodes)
p->poll = 1;
else if (vlist_length(&p->sources) > 1)
p->poll = 1;
else {
struct path_source *ps = (struct path_source *) vlist_at(&p->sources, 0);
int fds[16];
int num_fds = node_poll_fds(ps->node, fds);
p->poll = num_fds > 0;
}
else
p->poll = 0;
}
ret = vlist_destroy(&sources, NULL, false);