-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Description
- Type: Bug
- Priority: Minor
Target
K64F
Toolchain:
GCC_ARM
Toolchain version:
GCC 6
mbed-os sha:
latest tag
Expected behavior
More specific error when TX buffers go out of resources
explain:
in handshake flow, the "mbed_lwip_sendto()" function is called, when the flow reaches "k64f_low_level_output()" this function calls " osSemaphoreAcquire()" which returns osErrorResource which is translated by the lwip code to “ERR_BUFF – 0xfe” and by the higher level lwip code to
"NSAPI_ERROR_DEVICE_ERROR - 0xfffff43c"
The "NSAPI_ERROR_DEVICE_ERROR" is too generic in this case and we want more specific error for this case in order to be sure that waiting and calling the "mbed_lwip_sendto()" after resources are available can return with success.
We are trying to prevent a situation that we are in a loop and getting "NSAPI_ERROR_DEVICE_ERROR" from another reason.
Actual behavior
Getting more specific error value which say that the R/TX buffers are out of resource and the application can try again later after resources are available again.
Steps to reproduce
The issue happens during DTLS handshake in debug mode only.
attached the call stack: