1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-21 10:26:06 +03:00

Small code factoring improvement to do_client_connect()

git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@195 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
This commit is contained in:
cameronrich 2011-01-14 14:10:36 +00:00
parent f2dabd56b7
commit e68581f0c2

View File

@ -155,24 +155,12 @@ int do_client_connect(SSL *ssl)
{ {
while (ssl->hs_status != SSL_OK) while (ssl->hs_status != SSL_OK)
{ {
ret = basic_read(ssl, NULL); ret = ssl_read(ssl, NULL);
if (ret < SSL_OK) if (ret < SSL_OK)
{
if (ret != SSL_ERROR_CONN_LOST)
{
/* let the server know we are dying and why */
if (send_alert(ssl, ret))
{
/* something nasty happened, so get rid of it */
kill_ssl_session(ssl->ssl_ctx->ssl_sessions, ssl);
}
}
break; break;
} }
} }
}
ssl->hs_status = ret; /* connected? */ ssl->hs_status = ret; /* connected? */
return ret; return ret;