[Asterisk-code-review] res xmpp: Correctly check return value of SSL connect (asterisk[master])
Sean Bright
asteriskteam at digium.com
Thu Mar 23 09:58:06 CDT 2017
Sean Bright has uploaded a new change for review. ( https://gerrit.asterisk.org/5298 )
Change subject: res_xmpp: Correctly check return value of SSL_connect
......................................................................
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
---
M res/res_xmpp.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/98/5298/1
diff --git a/res/res_xmpp.c b/res/res_xmpp.c
index 1aa865c..ddd4a57 100644
--- a/res/res_xmpp.c
+++ b/res/res_xmpp.c
@@ -2670,7 +2670,7 @@
goto failure;
}
- if (!SSL_connect(client->ssl_session)) {
+ if (SSL_connect(client->ssl_session) <= 0) {
goto failure;
}
--
To view, visit https://gerrit.asterisk.org/5298
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifbf882896e598703b6c615407fa456d3199f95b1
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
More information about the asterisk-code-review
mailing list