res_xmpp: Correctly check return value of SSL_connect

SSL_connect returns non-zero for both success and some error conditions
so simply negating is inadequate.

Change-Id: Ifbf882896e598703b6c615407fa456d3199f95b1
This commit is contained in:
Sean Bright
2017-03-23 10:30:18 -04:00
parent c1ab8ca74c
commit 9493981419

View File

@@ -2670,7 +2670,7 @@ static int xmpp_client_requested_tls(struct ast_xmpp_client *client, struct ast_
goto failure;
}
if (!SSL_connect(client->ssl_session)) {
if (SSL_connect(client->ssl_session) <= 0) {
goto failure;
}