espressif / esp-aws-iot

AWS IoT SDK for ESP32 based chipsets
Apache License 2.0
257 stars 154 forks source link

set error code to negative value of transport interface (CA-176) #82

Closed ActoryOu closed 2 years ago

ActoryOu commented 2 years ago

Based on definition in network-interface, the return value is defined as negative value to indicate error. This patch set the return code of TLS_FreeRTOS_send/TLS_FreeRTOS_recv to negative value once send/recv fail.

  • @brief Transport interface for receiving data on the network.

  • ...

  • @return The number of bytes received or a negative value to indicate error. typedef int32_t ( TransportRecv_t )( NetworkContext_t pNetworkContext, ...

  • @brief Transport interface for sending data over the network.

  • ...

  • @return The number of bytes sent or a negative value to indicate error. typedef int32_t ( TransportSend_t )( NetworkContext_t pNetworkContext, ...

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.