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
48baa618
authored
Dec 31, 2014
by
Marcus Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mtapi_network_c: bugfix for partial send
parent
b6fa354f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
mtapi_network_c/src/embb_mtapi_network_socket.c
+11
-2
No files found.
mtapi_network_c/src/embb_mtapi_network_socket.c
View file @
48baa618
...
...
@@ -177,8 +177,17 @@ int embb_mtapi_network_socket_select(
int
embb_mtapi_network_socket_sendbuffer
(
embb_mtapi_network_socket_t
*
that
,
embb_mtapi_network_buffer_t
*
buffer
)
{
int
result
=
send
(
that
->
handle
,
buffer
->
data
,
buffer
->
size
,
0
);
if
(
result
==
buffer
->
size
)
{
char
*
buf
=
(
char
*
)(
buffer
->
data
);
int
cnt
=
0
;
int
result
=
send
(
that
->
handle
,
buf
,
buffer
->
size
,
0
);
while
(
result
>
0
)
{
buf
+=
result
;
cnt
+=
result
;
if
(
cnt
==
buffer
->
size
)
break
;
result
=
send
(
that
->
handle
,
buf
,
buffer
->
size
-
cnt
,
0
);
}
if
(
cnt
==
buffer
->
size
)
{
return
buffer
->
size
;
}
else
{
return
0
;
...
...
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