listen parrameter for Keil tcp net

This commit is contained in:
Takashi Kojo
2017-12-31 05:50:51 +09:00
committed by Takashi Kojo
parent cd0c5d4b93
commit d34fb44df2

View File

@ -64,7 +64,6 @@
static int wolfssl_tcp_select(int sd, int timeout)
{ return 0 ; }
#define tcp_select(sd,t) wolfssl_tcp_select(sd, t) /* avoid conflicting Keil TCP tcp_select */
#elif defined(WOLFSSL_TIRTOS)
#include <string.h>
#include <netdb.h>
@ -853,8 +852,12 @@ static INLINE void tcp_listen(SOCKET_T* sockfd, word16* port, int useAnyAddr,
if (bind(*sockfd, (const struct sockaddr*)&addr, sizeof(addr)) != 0)
err_sys("tcp bind failed");
if (!udp) {
if (listen(*sockfd, 5) != 0)
err_sys("tcp listen failed");
#ifndef WOLFSSL_KEIL_TCP_NET
if (listen(*sockfd, 5) != 0)
#else
if (listen(*sockfd, 1) != 0)
#endif
err_sys("tcp listen failed");
}
#if !defined(USE_WINDOWS_API) && !defined(WOLFSSL_TIRTOS)
if (*port == 0) {