Commit 192381aa authored by Paul Bakker's avatar Paul Bakker
Browse files

- Made listen backlog number a define

parent bcd5db49
......@@ -41,6 +41,8 @@
#define POLARSSL_ERR_NET_WANT_READ -0x0052 /**< Connection requires a read call. */
#define POLARSSL_ERR_NET_WANT_WRITE -0x0054 /**< Connection requires a write call. */
#define POLARSSL_NET_LISTEN_BACKLOG 10 /**< The backlog that listen() should use. */
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -189,7 +189,7 @@ int net_bind( int *fd, const char *bind_ip, int port )
return( POLARSSL_ERR_NET_BIND_FAILED );
}
if( listen( *fd, 10 ) != 0 )
if( listen( *fd, POLARSSL_NET_LISTEN_BACKLOG ) != 0 )
{
close( *fd );
return( POLARSSL_ERR_NET_LISTEN_FAILED );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment