]> git.sur5r.net Git - freertos/commit
Check socket binding result before doing anything with socket. (This is to address...
authoryuhzheng <yuhzheng@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Wed, 4 Dec 2019 07:52:49 +0000 (07:52 +0000)
committeryuhzheng <yuhzheng@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Wed, 4 Dec 2019 07:52:49 +0000 (07:52 +0000)
commitdf0ec74fc22df19591c07fab5f93cd671aa9d71a
tree778801f8a1d35d66bc11b2ef3c2aed8b0f675773
parent4d92662c49223bd837db9af28f28ea023baf6a88
Check socket binding result before doing anything with socket. (This is to address ARG findings.) Breaking the single return rule here, due to precedent violation at line 1039 and 1144.

prvTransferConnect() now returns:
- pdTRUE: everything's good. pdTRUE = 1.
- -pdFREERTOS_ERRNO_ENOMEM: FreeRTOS_socket() failed. -pdFREERTOS_ERRNO_ENOMEM = -12.
- -pdFREERTOS_ERRNO_EINVAL || -pdFREERTOS_ERRNO_ECANCELED: FreeRTOS_bind() failed. Negative values.

Thus, at line 569 and line 617, needs to check != pdTRUE instead of == pdFALSE.

This commit is done on behalf of Alfred.

git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2759 1d2547de-c912-0410-9cb9-b8ca96c0e9e2
FreeRTOS-Plus/Demo/Common/Demo_IP_Protocols/FTP/FreeRTOS_FTP_server.c