Skip to content

Commit

Permalink
Updated IoT Socket implementation with lwIP
Browse files Browse the repository at this point in the history
 - corrected iotSocketSend return value for non-blocking sockets
  • Loading branch information
RobertRostohar committed Jul 13, 2020
1 parent bd2dd34 commit 5101c15
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
6 changes: 5 additions & 1 deletion MDK-Packs.IoT_Socket.pdsc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
<url>https://github.com/MDK-Packs/Pack/raw/master/IoT_Socket/</url>
<license>LICENSE.txt</license>
<releases>
<release version="1.2.1" date="2020-07-13">
Updated IoT Socket implementation with lwIP:
- corrected iotSocketSend return value for non-blocking sockets
</release>
<release version="1.2.0" date="2020-04-22">
Updated IoT Socket API V1.2.0 (support for polling Socket Receive/Send)
Updated IoT Socket implementation with MDK Network
Expand Down Expand Up @@ -68,7 +72,7 @@
<file category="source" name="source/mdk_network/iot_socket.c"/>
</files>
</component>
<component Cclass="IoT Utility" Cgroup="Socket" Csub="lwIP" Capiversion="1.2.0" Cversion="1.0.0" condition="lwIP Socket">
<component Cclass="IoT Utility" Cgroup="Socket" Csub="lwIP" Capiversion="1.2.0" Cversion="1.0.1" condition="lwIP Socket">
<description>IoT Socket implementation with lwIP</description>
<RTE_Components_h>
<!-- the following content goes into file 'RTE_Components.h' -->
Expand Down
2 changes: 1 addition & 1 deletion documentation/IoT_Socket.dxy
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "IoT Socket"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = "Version 1.2.0"
PROJECT_NUMBER = "Version 1.2.1"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
5 changes: 4 additions & 1 deletion source/lwip/iot_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,10 @@ int32_t iotSocketSend (int32_t socket, const void *buf, uint32_t len) {
}
rc = send(socket, buf, len, 0);
if (rc < 0) {
return errno_to_rc ();
rc = errno_to_rc ();
if (rc == IOT_SOCKET_EINPROGRESS && sock_attr[socket-LWIP_SOCKET_OFFSET].ionbio) {
return IOT_SOCKET_EAGAIN;
}
}

return rc;
Expand Down

0 comments on commit 5101c15

Please sign in to comment.