From ecfc10baef9a4aef4c2a9cbd00a331fc26efacfb Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 12 Feb 2019 19:57:09 +0100 Subject: [PATCH] iec61850_sv: fail if direction not configured --- lib/nodes/iec61850_sv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nodes/iec61850_sv.c b/lib/nodes/iec61850_sv.c index 9cf2e193c..f1faa84c3 100644 --- a/lib/nodes/iec61850_sv.c +++ b/lib/nodes/iec61850_sv.c @@ -352,7 +352,7 @@ int iec61850_sv_read(struct node *n, struct sample *smps[], unsigned cnt, unsign struct sample *smpt[cnt]; if (!i->in.enabled) - return 0; + return -1; pulled = queue_signalled_pull_many(&i->in.queue, (void **) smpt, cnt); @@ -367,7 +367,7 @@ int iec61850_sv_write(struct node *n, struct sample *smps[], unsigned cnt, unsig struct iec61850_sv *i = (struct iec61850_sv *) n->_vd; if (!i->out.enabled) - return 0; + return -1; for (unsigned j = 0; j < cnt; j++) { unsigned offset = 0;