mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-04 04:32:24 -05:00 
			
		
		
		
	Fix ret code in ssl_fork_server.c
This commit is contained in:
		
							parent
							
								
									5517202541
								
							
						
					
					
						commit
						4be53b5519
					
				@ -29,10 +29,13 @@
 | 
			
		||||
#include "mbedtls/platform.h"
 | 
			
		||||
#else
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#define mbedtls_fprintf    fprintf
 | 
			
		||||
#define mbedtls_printf     printf
 | 
			
		||||
#define mbedtls_time_t     time_t
 | 
			
		||||
#endif
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#define mbedtls_fprintf         fprintf
 | 
			
		||||
#define mbedtls_printf          printf
 | 
			
		||||
#define mbedtls_time_t          time_t
 | 
			
		||||
#define MBEDTLS_EXTI_SUCCESS    EXIT_SUCCESS
 | 
			
		||||
#define MBEDTLS_EXIT_FAILURE    EXIT_FAILURE
 | 
			
		||||
#endif /* MBEDTLS_PLATFORM_C */
 | 
			
		||||
 | 
			
		||||
#if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_CERTS_C) ||    \
 | 
			
		||||
    !defined(MBEDTLS_ENTROPY_C) || !defined(MBEDTLS_SSL_TLS_C) || \
 | 
			
		||||
@ -95,7 +98,8 @@ static void my_debug( void *ctx, int level,
 | 
			
		||||
 | 
			
		||||
int main( void )
 | 
			
		||||
{
 | 
			
		||||
    int ret, len, cnt = 0, pid;
 | 
			
		||||
    int ret = 1, len, cnt = 0, pid;
 | 
			
		||||
    int exit_code = MBEDTLS_EXIT_FAILURE;
 | 
			
		||||
    mbedtls_net_context listen_fd, client_fd;
 | 
			
		||||
    unsigned char buf[1024];
 | 
			
		||||
    const char *pers = "ssl_fork_server";
 | 
			
		||||
@ -392,6 +396,8 @@ int main( void )
 | 
			
		||||
        goto exit;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    exit_code = MBEDTLS_EXIT_SUCCESS;
 | 
			
		||||
 | 
			
		||||
exit:
 | 
			
		||||
    mbedtls_net_free( &client_fd );
 | 
			
		||||
    mbedtls_net_free( &listen_fd );
 | 
			
		||||
@ -408,7 +414,7 @@ exit:
 | 
			
		||||
    fflush( stdout ); getchar();
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    return( ret );
 | 
			
		||||
    return( exit_code );
 | 
			
		||||
}
 | 
			
		||||
#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_CERTS_C && MBEDTLS_ENTROPY_C &&
 | 
			
		||||
          MBEDTLS_SSL_TLS_C && MBEDTLS_SSL_SRV_C && MBEDTLS_NET_C &&
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user