mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +02:00
listen parrameter for Keil tcp net
This commit is contained in:
committed by
Takashi Kojo
parent
cd0c5d4b93
commit
d34fb44df2
@@ -64,7 +64,6 @@
|
|||||||
|
|
||||||
static int wolfssl_tcp_select(int sd, int timeout)
|
static int wolfssl_tcp_select(int sd, int timeout)
|
||||||
{ return 0 ; }
|
{ return 0 ; }
|
||||||
#define tcp_select(sd,t) wolfssl_tcp_select(sd, t) /* avoid conflicting Keil TCP tcp_select */
|
|
||||||
#elif defined(WOLFSSL_TIRTOS)
|
#elif defined(WOLFSSL_TIRTOS)
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <netdb.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)
|
if (bind(*sockfd, (const struct sockaddr*)&addr, sizeof(addr)) != 0)
|
||||||
err_sys("tcp bind failed");
|
err_sys("tcp bind failed");
|
||||||
if (!udp) {
|
if (!udp) {
|
||||||
if (listen(*sockfd, 5) != 0)
|
#ifndef WOLFSSL_KEIL_TCP_NET
|
||||||
err_sys("tcp listen failed");
|
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 !defined(USE_WINDOWS_API) && !defined(WOLFSSL_TIRTOS)
|
||||||
if (*port == 0) {
|
if (*port == 0) {
|
||||||
|
Reference in New Issue
Block a user