Merge pull request #1593 from akallabeth/transport_fixes

Transport disconnect fixes
This commit is contained in:
Marc-André Moreau 2013-11-14 09:12:12 -08:00
commit c347dd0843
2 changed files with 6 additions and 0 deletions

View File

@ -74,6 +74,9 @@ BOOL transport_disconnect(rdpTransport* transport)
{ {
BOOL status = TRUE; BOOL status = TRUE;
if (!transport)
return FALSE;
if (transport->layer == TRANSPORT_LAYER_TLS) if (transport->layer == TRANSPORT_LAYER_TLS)
status &= tls_disconnect(transport->TlsIn); status &= tls_disconnect(transport->TlsIn);

View File

@ -360,6 +360,9 @@ BOOL tls_accept(rdpTls* tls, const char* cert_file, const char* privatekey_file)
BOOL tls_disconnect(rdpTls* tls) BOOL tls_disconnect(rdpTls* tls)
{ {
if (!tls)
return FALSE;
if (tls->ssl) if (tls->ssl)
SSL_shutdown(tls->ssl); SSL_shutdown(tls->ssl);