diff --git a/include/villas/nodes/ethercat.hpp b/include/villas/nodes/ethercat.hpp index 25ceb5769..447613963 100644 --- a/include/villas/nodes/ethercat.hpp +++ b/include/villas/nodes/ethercat.hpp @@ -51,7 +51,6 @@ extern "C" { } #define DEFAULT_ETHERCAT_QUEUE_LENGTH (DEFAULT_QUEUE_LENGTH * 64) -#define DEFAULT_ETHERCAT_SAMPLE_LENGTH DEFAULT_SAMPLE_LENGTH /** Internal data per ethercat node */ struct ethercat { diff --git a/include/villas/nodes/websocket.hpp b/include/villas/nodes/websocket.hpp index 82e35486d..dd98bdee7 100644 --- a/include/villas/nodes/websocket.hpp +++ b/include/villas/nodes/websocket.hpp @@ -40,7 +40,6 @@ struct vnode; #define DEFAULT_WEBSOCKET_QUEUE_LENGTH (DEFAULT_QUEUE_LENGTH * 64) -#define DEFAULT_WEBSOCKET_SAMPLE_LENGTH DEFAULT_SAMPLE_LENGTH /* Forward declaration */ struct lws; diff --git a/lib/nodes/ethercat.cpp b/lib/nodes/ethercat.cpp index 3eac93c7f..491d36bc6 100644 --- a/lib/nodes/ethercat.cpp +++ b/lib/nodes/ethercat.cpp @@ -389,7 +389,7 @@ int ethercat_init(struct vnode *n) new (&w->thread) std::thread(); new (&w->task) Task(CLOCK_REALTIME); - ret = pool_init(&w->pool, DEFAULT_ETHERCAT_QUEUE_LENGTH, SAMPLE_LENGTH(DEFAULT_ETHERCAT_SAMPLE_LENGTH)); + ret = pool_init(&w->pool, DEFAULT_ETHERCAT_QUEUE_LENGTH, SAMPLE_LENGTH(vlist_length(&n->in.signals))); if (ret) return ret; diff --git a/lib/nodes/websocket.cpp b/lib/nodes/websocket.cpp index c6ac229cd..356f6ac56 100644 --- a/lib/nodes/websocket.cpp +++ b/lib/nodes/websocket.cpp @@ -372,7 +372,7 @@ int websocket_start(struct vnode *n) int ret; struct websocket *w = (struct websocket *) n->_vd; - ret = pool_init(&w->pool, DEFAULT_WEBSOCKET_QUEUE_LENGTH, SAMPLE_LENGTH(DEFAULT_WEBSOCKET_SAMPLE_LENGTH)); + ret = pool_init(&w->pool, DEFAULT_WEBSOCKET_QUEUE_LENGTH, SAMPLE_LENGTH(vlist_length(&n->in.signals))); if (ret) return ret;