mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-17 01:12:40 +00:00
BUG26879: set ret value in TCP_EVENT_ macros when function is not set
This commit is contained in:
parent
c232edb83a
commit
776e1926a3
@ -474,12 +474,14 @@ err_t lwip_tcp_event(void *arg, struct tcp_pcb *pcb,
|
||||
do { \
|
||||
if((pcb)->accept != NULL) \
|
||||
(ret) = (pcb)->accept((pcb)->callback_arg,(pcb),(err)); \
|
||||
else (ret) = ERR_OK; \
|
||||
} while (0)
|
||||
|
||||
#define TCP_EVENT_SENT(pcb,space,ret) \
|
||||
do { \
|
||||
if((pcb)->sent != NULL) \
|
||||
(ret) = (pcb)->sent((pcb)->callback_arg,(pcb),(space)); \
|
||||
else (ret) = ERR_OK; \
|
||||
} while (0)
|
||||
|
||||
#define TCP_EVENT_RECV(pcb,p,err,ret) \
|
||||
@ -497,12 +499,14 @@ err_t lwip_tcp_event(void *arg, struct tcp_pcb *pcb,
|
||||
do { \
|
||||
if((pcb)->connected != NULL) \
|
||||
(ret) = (pcb)->connected((pcb)->callback_arg,(pcb),(err)); \
|
||||
else (ret) = ERR_OK; \
|
||||
} while (0)
|
||||
|
||||
#define TCP_EVENT_POLL(pcb,ret) \
|
||||
do { \
|
||||
if((pcb)->poll != NULL) \
|
||||
(ret) = (pcb)->poll((pcb)->callback_arg,(pcb)); \
|
||||
else (ret) = ERR_OK; \
|
||||
} while (0)
|
||||
|
||||
#define TCP_EVENT_ERR(errf,arg,err) \
|
||||
|
Loading…
Reference in New Issue
Block a user