Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sven Gestegård Robertz
LabComm
Commits
688412ff
Commit
688412ff
authored
Jun 28, 2013
by
Anders Blomdell
Browse files
Call handler only when reader is without errors.
parent
d8cab5f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/c/labcomm_decoder.c
View file @
688412ff
...
...
@@ -259,11 +259,13 @@ static void call_handler(void *value, void *context)
{
struct
call_handler_context
*
wrap
=
context
;
labcomm_reader_start
(
wrap
->
reader
,
wrap
->
reader
->
action_context
,
wrap
->
local_index
,
wrap
->
remote_index
,
wrap
->
signature
,
value
);
wrap
->
handler
(
value
,
wrap
->
context
);
labcomm_reader_end
(
wrap
->
reader
,
wrap
->
reader
->
action_context
);
if
(
wrap
->
reader
->
error
>=
0
)
{
labcomm_reader_start
(
wrap
->
reader
,
wrap
->
reader
->
action_context
,
wrap
->
local_index
,
wrap
->
remote_index
,
wrap
->
signature
,
value
);
wrap
->
handler
(
value
,
wrap
->
context
);
labcomm_reader_end
(
wrap
->
reader
,
wrap
->
reader
->
action_context
);
}
}
static
void
reader_alloc
(
struct
labcomm_decoder
*
d
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment