summaryrefslogtreecommitdiff
path: root/pjlib
diff options
context:
space:
mode:
authorLiong Sauw Ming <ming@teluu.com>2016-06-15 01:59:14 +0000
committerLiong Sauw Ming <ming@teluu.com>2016-06-15 01:59:14 +0000
commitc00517e9d22522df48e02fc523d454ec2af99e76 (patch)
treefcd231a0cdfef0900de81d67e7c543dede97aaae /pjlib
parent5c501dbfeb072cb6dc36b400358e21d6d615eba1 (diff)
Re #1930: Revert back the change to comment do_handshake() in on_accept_complete() committed in r5343.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5344 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib')
-rw-r--r--pjlib/src/pj/ssl_sock_ossl.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/pjlib/src/pj/ssl_sock_ossl.c b/pjlib/src/pj/ssl_sock_ossl.c
index 835d86f1..c049f3c9 100644
--- a/pjlib/src/pj/ssl_sock_ossl.c
+++ b/pjlib/src/pj/ssl_sock_ossl.c
@@ -1968,14 +1968,11 @@ static pj_bool_t asock_on_accept_complete (pj_activesock_t *asock,
/* Start SSL handshake */
ssock->ssl_state = SSL_STATE_HANDSHAKING;
SSL_set_accept_state(ssock->ossl_ssl);
- //To avoid race condition, we don't need to do it here and
- //let the handshake happen in ssock->asock's callback instead.
- //status = do_handshake(ssock);
+ status = do_handshake(ssock);
on_return:
- if (ssock && status != PJ_SUCCESS) {
- //on_handshake_complete(ssock, status);
- close_sockets(ssock);
+ if (ssock && status != PJ_EPENDING) {
+ on_handshake_complete(ssock, status);
}
/* Must return PJ_TRUE whatever happened, as active socket must