From 776e1926a31eaf94dc085dce648666c15a38530d Mon Sep 17 00:00:00 2001 From: kieranm Date: Thu, 25 Jun 2009 10:03:53 +0000 Subject: [PATCH] BUG26879: set ret value in TCP_EVENT_ macros when function is not set --- src/include/lwip/tcp.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/include/lwip/tcp.h b/src/include/lwip/tcp.h index 40025753..8f6b9d3c 100644 --- a/src/include/lwip/tcp.h +++ b/src/include/lwip/tcp.h @@ -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) \