mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-04 04:32:24 -05:00 
			
		
		
		
	- Made listen backlog number a define
This commit is contained in:
		
							parent
							
								
									bcd5db493f
								
							
						
					
					
						commit
						192381aa89
					
				@ -41,6 +41,8 @@
 | 
				
			|||||||
#define POLARSSL_ERR_NET_WANT_READ                         -0x0052  /**< Connection requires a read call. */
 | 
					#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_ERR_NET_WANT_WRITE                        -0x0054  /**< Connection requires a write call. */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define POLARSSL_NET_LISTEN_BACKLOG         10 /**< The backlog that listen() should use. */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef __cplusplus
 | 
					#ifdef __cplusplus
 | 
				
			||||||
extern "C" {
 | 
					extern "C" {
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
				
			|||||||
@ -189,7 +189,7 @@ int net_bind( int *fd, const char *bind_ip, int port )
 | 
				
			|||||||
        return( POLARSSL_ERR_NET_BIND_FAILED );
 | 
					        return( POLARSSL_ERR_NET_BIND_FAILED );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if( listen( *fd, 10 ) != 0 )
 | 
					    if( listen( *fd, POLARSSL_NET_LISTEN_BACKLOG ) != 0 )
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        close( *fd );
 | 
					        close( *fd );
 | 
				
			||||||
        return( POLARSSL_ERR_NET_LISTEN_FAILED );
 | 
					        return( POLARSSL_ERR_NET_LISTEN_FAILED );
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user