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
253edaf2
authored
9 years ago
by
Marcus Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mtapi_network_c: improved error handling
parent
5bbc63a1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
3 deletions
+7
-3
mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c
+0
-0
mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network_buffer.c
+4
-1
mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network_buffer.h
+1
-1
mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network_socket.c
+2
-1
No files found.
mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c
View file @
253edaf2
This diff is collapsed.
Click to expand it.
mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network_buffer.c
View file @
253edaf2
...
...
@@ -28,9 +28,10 @@
#include <embb/base/c/memory_allocation.h>
#include <string.h>
void
embb_mtapi_network_buffer_initialize
(
int
embb_mtapi_network_buffer_initialize
(
embb_mtapi_network_buffer_t
*
that
,
int
capacity
)
{
int
result
=
1
;
that
->
position
=
0
;
that
->
size
=
0
;
that
->
data
=
(
char
*
)
embb_alloc
((
size_t
)
capacity
);
...
...
@@ -38,7 +39,9 @@ void embb_mtapi_network_buffer_initialize(
that
->
capacity
=
capacity
;
}
else
{
that
->
capacity
=
0
;
result
=
0
;
}
return
result
;
}
void
embb_mtapi_network_buffer_finalize
(
...
...
This diff is collapsed.
Click to expand it.
mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network_buffer.h
View file @
253edaf2
...
...
@@ -43,7 +43,7 @@ struct embb_mtapi_network_buffer_struct {
typedef
struct
embb_mtapi_network_buffer_struct
embb_mtapi_network_buffer_t
;
void
embb_mtapi_network_buffer_initialize
(
int
embb_mtapi_network_buffer_initialize
(
embb_mtapi_network_buffer_t
*
that
,
int
capacity
);
...
...
This diff is collapsed.
Click to expand it.
mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network_socket.c
View file @
253edaf2
...
...
@@ -116,7 +116,8 @@ int embb_mtapi_network_socket_connect(
if
(
SOCKET_ERROR
==
connect
(
that
->
handle
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
)))
{
#ifdef _WIN32
if
(
WSAEWOULDBLOCK
!=
WSAGetLastError
())
int
err
=
WSAGetLastError
();
if
(
WSAEWOULDBLOCK
!=
err
)
#else
if
(
EAGAIN
!=
errno
)
#endif
...
...
This diff is collapsed.
Click to expand it.
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