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

use more assertions to check node state machine

This commit is contained in:
Steffen Vogel 2018-07-16 08:30:59 +02:00
parent 81a2fde6a1
commit 5edea6a09b

View file

@ -416,8 +416,8 @@ int node_read(struct node *n, struct sample *smps[], unsigned cnt, unsigned *rel
{
int readd, nread = 0;
if (!n->_vt->read)
return -1;
assert(n->state == STATE_STARTED);
assert(node_type(n)->read);
/* Send in parts if vector not supported */
if (node_type(n)->vectorize > 0 && node_type(n)->vectorize < cnt) {
@ -478,8 +478,8 @@ int node_write(struct node *n, struct sample *smps[], unsigned cnt, unsigned *re
{
int sent, nsent = 0;
if (!n->_vt->write)
return -1;
assert(n->state == STATE_STARTED);
assert(node_type(n)->write);
#ifdef WITH_HOOKS
/* Run write hooks */