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
2aad5ee8
authored
Dec 29, 2014
by
Marcus Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mtapi_network_c: fixed group and buffer bugs
parent
dcf26ae8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletions
+15
-1
mtapi_network_c/src/embb_mtapi_network.c
+10
-0
mtapi_network_c/src/embb_mtapi_network_socket.c
+5
-1
No files found.
mtapi_network_c/src/embb_mtapi_network.c
View file @
2aad5ee8
...
@@ -40,6 +40,7 @@
...
@@ -40,6 +40,7 @@
#include <embb_mtapi_task_t.h>
#include <embb_mtapi_task_t.h>
#include <embb_mtapi_action_t.h>
#include <embb_mtapi_action_t.h>
#include <embb_mtapi_node_t.h>
#include <embb_mtapi_node_t.h>
#include <embb_mtapi_group_t.h>
#include <mtapi_status_t.h>
#include <mtapi_status_t.h>
int
embb_mtapi_network_initialize
()
{
int
embb_mtapi_network_initialize
()
{
...
@@ -319,6 +320,15 @@ static int embb_mtapi_network_thread(void * args) {
...
@@ -319,6 +320,15 @@ static int embb_mtapi_network_thread(void * args) {
local_task
->
error_code
=
task_status
;
local_task
->
error_code
=
task_status
;
local_task
->
state
=
MTAPI_TASK_COMPLETED
;
local_task
->
state
=
MTAPI_TASK_COMPLETED
;
embb_atomic_fetch_and_add_int
(
&
local_action
->
num_tasks
,
-
1
);
embb_atomic_fetch_and_add_int
(
&
local_action
->
num_tasks
,
-
1
);
/* is task associated with a group? */
if
(
embb_mtapi_group_pool_is_handle_valid
(
node
->
group_pool
,
local_task
->
group
))
{
embb_mtapi_group_t
*
local_group
=
embb_mtapi_group_pool_get_storage_for_handle
(
node
->
group_pool
,
local_task
->
group
);
embb_mtapi_task_queue_push
(
&
local_group
->
queue
,
local_task
);
}
}
}
}
}
}
}
...
...
mtapi_network_c/src/embb_mtapi_network_socket.c
View file @
2aad5ee8
...
@@ -206,7 +206,11 @@ int embb_mtapi_network_socket_recvbuffer_sized(
...
@@ -206,7 +206,11 @@ int embb_mtapi_network_socket_recvbuffer_sized(
if (size > (int)bytes_available)
if (size > (int)bytes_available)
return 0;
return 0;
*/
*/
err
=
recv
(
that
->
handle
,
buffer
->
data
,
size
,
0
);
if
(
0
<
size
)
{
err
=
recv
(
that
->
handle
,
buffer
->
data
,
size
,
0
);
}
else
{
err
=
0
;
}
if
(
err
!=
size
)
if
(
err
!=
size
)
return
0
;
return
0
;
buffer
->
size
=
size
;
buffer
->
size
=
size
;
...
...
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