ssl_client2 and ssl_server2 now exit with 1 on errors (shell

limitations)
This commit is contained in:
Paul Bakker 2013-07-24 16:28:35 +02:00
parent f85778efb0
commit dbd79ca617
2 changed files with 8 additions and 0 deletions

View file

@ -805,6 +805,10 @@ exit:
fflush( stdout ); getchar(); fflush( stdout ); getchar();
#endif #endif
// Shell can not handle large exit numbers -> 1 for errors
if( ret < 0 )
ret = 1;
return( ret ); return( ret );
} }
#endif /* POLARSSL_BIGNUM_C && POLARSSL_ENTROPY_C && POLARSSL_SSL_TLS_C && #endif /* POLARSSL_BIGNUM_C && POLARSSL_ENTROPY_C && POLARSSL_SSL_TLS_C &&

View file

@ -865,6 +865,10 @@ exit:
fflush( stdout ); getchar(); fflush( stdout ); getchar();
#endif #endif
// Shell can not handle large exit numbers -> 1 for errors
if( ret < 0 )
ret = 1;
return( ret ); return( ret );
} }
#endif /* POLARSSL_BIGNUM_C && POLARSSL_ENTROPY_C && POLARSSL_SSL_TLS_C && #endif /* POLARSSL_BIGNUM_C && POLARSSL_ENTROPY_C && POLARSSL_SSL_TLS_C &&