Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
FORMUS3IC_LAS3
/
embb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
55a04f15
authored
Feb 11, 2016
by
Marcus Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mtapi_c: set result to MTAPI_NULL on error in mtapi_group_wait_any
parent
001a3f78
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
mtapi_c/src/embb_mtapi_group_t.c
+7
-4
No files found.
mtapi_c/src/embb_mtapi_group_t.c
View file @
55a04f15
...
@@ -279,6 +279,7 @@ void mtapi_group_wait_any(
...
@@ -279,6 +279,7 @@ void mtapi_group_wait_any(
MTAPI_IN
mtapi_timeout_t
timeout
,
MTAPI_IN
mtapi_timeout_t
timeout
,
MTAPI_OUT
mtapi_status_t
*
status
)
{
MTAPI_OUT
mtapi_status_t
*
status
)
{
mtapi_status_t
local_status
=
MTAPI_ERR_UNKNOWN
;
mtapi_status_t
local_status
=
MTAPI_ERR_UNKNOWN
;
void
*
local_result
=
MTAPI_NULL
;
embb_mtapi_log_trace
(
"mtapi_group_wait_any() called
\n
"
);
embb_mtapi_log_trace
(
"mtapi_group_wait_any() called
\n
"
);
...
@@ -335,10 +336,7 @@ void mtapi_group_wait_any(
...
@@ -335,10 +336,7 @@ void mtapi_group_wait_any(
}
}
/* was there a timeout, or is there a result? */
/* was there a timeout, or is there a result? */
if
(
MTAPI_NULL
!=
local_task
)
{
if
(
MTAPI_NULL
!=
local_task
)
{
/* store result */
local_result
=
local_task
->
result_buffer
;
if
(
MTAPI_NULL
!=
result
)
{
*
result
=
local_task
->
result_buffer
;
}
/* return error code set by the task */
/* return error code set by the task */
local_status
=
local_task
->
error_code
;
local_status
=
local_task
->
error_code
;
...
@@ -356,6 +354,11 @@ void mtapi_group_wait_any(
...
@@ -356,6 +354,11 @@ void mtapi_group_wait_any(
local_status
=
MTAPI_ERR_NODE_NOTINIT
;
local_status
=
MTAPI_ERR_NODE_NOTINIT
;
}
}
/* store result */
if
(
MTAPI_NULL
!=
result
)
{
*
result
=
local_result
;
}
mtapi_status_set
(
status
,
local_status
);
mtapi_status_set
(
status
,
local_status
);
embb_mtapi_log_trace
(
"mtapi_group_wait_any() returns
\n
"
);
embb_mtapi_log_trace
(
"mtapi_group_wait_any() returns
\n
"
);
}
}
...
...
Write
Preview
Markdown
is supported
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