- Made listen backlog number a define

This commit is contained in:
Paul Bakker 2011-05-20 12:31:31 +00:00
parent bcd5db493f
commit 192381aa89
2 changed files with 3 additions and 1 deletions

View file

@ -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

View file

@ -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 );