summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Bright <sean.bright@gmail.com>2017-03-23 10:30:18 -0400
committerSean Bright <sean.bright@gmail.com>2017-03-25 12:01:28 -0400
commit03b99ae3d29aa9b49e6e1bd538feddb9813d6daf (patch)
tree40290c47fdbe900bb0469e7a5b18a7b343fd18c2
parent55693383e204d51eea08d6bb7f1a030c472ea0f9 (diff)
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
-rw-r--r--res/res_xmpp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_xmpp.c b/res/res_xmpp.c
index e422c14a2..aee2cf5cf 100644
--- a/res/res_xmpp.c
+++ b/res/res_xmpp.c
@@ -2664,7 +2664,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;
}