From: Sean Bright Date: Thu, 23 Mar 2017 14:30:18 +0000 (-0400) Subject: res_xmpp: Correctly check return value of SSL_connect X-Git-Tag: 14.5.0-rc1~87^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=138f2bfa82d7b4679d915dbb87e84a5434a3f223;p=thirdparty%2Fasterisk.git 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 --- diff --git a/res/res_xmpp.c b/res/res_xmpp.c index 32e1dd1ffc..a6dfb9f90d 100644 --- a/res/res_xmpp.c +++ b/res/res_xmpp.c @@ -2672,7 +2672,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; }