mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-16 00:00:02 +01:00
use more assertions to check node state machine
This commit is contained in:
parent
81a2fde6a1
commit
5edea6a09b
1 changed files with 4 additions and 4 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Reference in a new issue