mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-03-23 09:55:06 +00:00
Fix ret code in ssl_fork_server.c
This commit is contained in:
parent
bc1af79add
commit
e4f79e1902
|
@ -29,10 +29,13 @@
|
||||||
#include "mbedtls/platform.h"
|
#include "mbedtls/platform.h"
|
||||||
#else
|
#else
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#define mbedtls_fprintf fprintf
|
#include <stdlib.h>
|
||||||
#define mbedtls_printf printf
|
#define mbedtls_fprintf fprintf
|
||||||
#define mbedtls_time_t time_t
|
#define mbedtls_printf printf
|
||||||
#endif
|
#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) || \
|
#if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_CERTS_C) || \
|
||||||
!defined(MBEDTLS_ENTROPY_C) || !defined(MBEDTLS_SSL_TLS_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 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;
|
mbedtls_net_context listen_fd, client_fd;
|
||||||
unsigned char buf[1024];
|
unsigned char buf[1024];
|
||||||
const char *pers = "ssl_fork_server";
|
const char *pers = "ssl_fork_server";
|
||||||
|
@ -392,6 +396,8 @@ int main( void )
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exit_code = MBEDTLS_EXIT_SUCCESS;
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
mbedtls_net_free( &client_fd );
|
mbedtls_net_free( &client_fd );
|
||||||
mbedtls_net_free( &listen_fd );
|
mbedtls_net_free( &listen_fd );
|
||||||
|
@ -408,7 +414,7 @@ exit:
|
||||||
fflush( stdout ); getchar();
|
fflush( stdout ); getchar();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return( ret );
|
return( exit_code );
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_CERTS_C && MBEDTLS_ENTROPY_C &&
|
#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_CERTS_C && MBEDTLS_ENTROPY_C &&
|
||||||
MBEDTLS_SSL_TLS_C && MBEDTLS_SSL_SRV_C && MBEDTLS_NET_C &&
|
MBEDTLS_SSL_TLS_C && MBEDTLS_SSL_SRV_C && MBEDTLS_NET_C &&
|
||||||
|
|
Loading…
Reference in a new issue