Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
73a6b53d
Commit
73a6b53d
authored
Jan 04, 2022
by
iabdalkader
Committed by
Damien George
Jan 06, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extmod/network_ninaw10: Return -1 on timeout from recv/send.
parent
544c232e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
extmod/network_ninaw10.c
extmod/network_ninaw10.c
+4
-4
No files found.
extmod/network_ninaw10.c
View file @
73a6b53d
...
@@ -435,7 +435,7 @@ STATIC mp_uint_t network_ninaw10_socket_send(mod_network_socket_obj_t *socket, c
...
@@ -435,7 +435,7 @@ STATIC mp_uint_t network_ninaw10_socket_send(mod_network_socket_obj_t *socket, c
if
(
ret
==
NINA_ERROR_TIMEOUT
)
{
if
(
ret
==
NINA_ERROR_TIMEOUT
)
{
// The socket is Not closed on timeout when calling functions that accept a timeout.
// The socket is Not closed on timeout when calling functions that accept a timeout.
*
_errno
=
MP_ETIMEDOUT
;
*
_errno
=
MP_ETIMEDOUT
;
return
0
;
return
-
1
;
}
else
if
(
ret
<
0
)
{
}
else
if
(
ret
<
0
)
{
// Close the socket on any other errors.
// Close the socket on any other errors.
*
_errno
=
ret
;
*
_errno
=
ret
;
...
@@ -450,7 +450,7 @@ STATIC mp_uint_t network_ninaw10_socket_recv(mod_network_socket_obj_t *socket, b
...
@@ -450,7 +450,7 @@ STATIC mp_uint_t network_ninaw10_socket_recv(mod_network_socket_obj_t *socket, b
if
(
ret
==
NINA_ERROR_TIMEOUT
)
{
if
(
ret
==
NINA_ERROR_TIMEOUT
)
{
// The socket is Not closed on timeout when calling functions that accept a timeout.
// The socket is Not closed on timeout when calling functions that accept a timeout.
*
_errno
=
MP_ETIMEDOUT
;
*
_errno
=
MP_ETIMEDOUT
;
return
0
;
return
-
1
;
}
else
if
(
ret
<
0
)
{
}
else
if
(
ret
<
0
)
{
// Close the socket on any other errors.
// Close the socket on any other errors.
*
_errno
=
ret
;
*
_errno
=
ret
;
...
@@ -482,7 +482,7 @@ STATIC mp_uint_t network_ninaw10_socket_sendto(mod_network_socket_obj_t *socket,
...
@@ -482,7 +482,7 @@ STATIC mp_uint_t network_ninaw10_socket_sendto(mod_network_socket_obj_t *socket,
if
(
ret
==
NINA_ERROR_TIMEOUT
)
{
if
(
ret
==
NINA_ERROR_TIMEOUT
)
{
// The socket is Not closed on timeout when calling functions that accept a timeout.
// The socket is Not closed on timeout when calling functions that accept a timeout.
*
_errno
=
MP_ETIMEDOUT
;
*
_errno
=
MP_ETIMEDOUT
;
return
0
;
return
-
1
;
}
else
if
(
ret
<
0
)
{
}
else
if
(
ret
<
0
)
{
*
_errno
=
ret
;
*
_errno
=
ret
;
network_ninaw10_socket_close
(
socket
);
network_ninaw10_socket_close
(
socket
);
...
@@ -502,7 +502,7 @@ STATIC mp_uint_t network_ninaw10_socket_recvfrom(mod_network_socket_obj_t *socke
...
@@ -502,7 +502,7 @@ STATIC mp_uint_t network_ninaw10_socket_recvfrom(mod_network_socket_obj_t *socke
if
(
ret
==
NINA_ERROR_TIMEOUT
)
{
if
(
ret
==
NINA_ERROR_TIMEOUT
)
{
// The socket is Not closed on timeout when calling functions that accept a timeout.
// The socket is Not closed on timeout when calling functions that accept a timeout.
*
_errno
=
MP_ETIMEDOUT
;
*
_errno
=
MP_ETIMEDOUT
;
return
0
;
return
-
1
;
}
else
if
(
ret
<
0
)
{
}
else
if
(
ret
<
0
)
{
// Close the socket on any other errors.
// Close the socket on any other errors.
*
_errno
=
ret
;
*
_errno
=
ret
;
...
...
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