Skip to content
Snippets Groups Projects
Commit 688412ff authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Call handler only when reader is without errors.

parent d8cab5f2
No related branches found
No related tags found
No related merge requests found
...@@ -259,12 +259,14 @@ static void call_handler(void *value, void *context) ...@@ -259,12 +259,14 @@ static void call_handler(void *value, void *context)
{ {
struct call_handler_context *wrap = context; struct call_handler_context *wrap = context;
if (wrap->reader->error >= 0) {
labcomm_reader_start(wrap->reader, wrap->reader->action_context, labcomm_reader_start(wrap->reader, wrap->reader->action_context,
wrap->local_index, wrap->remote_index, wrap->signature, wrap->local_index, wrap->remote_index, wrap->signature,
value); value);
wrap->handler(value, wrap->context); wrap->handler(value, wrap->context);
labcomm_reader_end(wrap->reader, wrap->reader->action_context); labcomm_reader_end(wrap->reader, wrap->reader->action_context);
} }
}
static void reader_alloc(struct labcomm_decoder *d) static void reader_alloc(struct labcomm_decoder *d)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment