From 9c94a9ad48af2c455204712312479ca98f5bc2da Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Fri, 29 Dec 2006 02:25:03 +0000 Subject: Fixed TLS transport when IOCP is used git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@872 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/src/pjsip/sip_transport_tls_ossl.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pjsip/src/pjsip/sip_transport_tls_ossl.c b/pjsip/src/pjsip/sip_transport_tls_ossl.c index 97d820f7..a20f8ff0 100644 --- a/pjsip/src/pjsip/sip_transport_tls_ossl.c +++ b/pjsip/src/pjsip/sip_transport_tls_ossl.c @@ -2043,7 +2043,15 @@ static void on_read_complete(pj_ioqueue_key_t *key, */ flags = PJ_IOQUEUE_ALWAYS_ASYNC; } else { - flags = 0; + /* This doesn't work too well when IOCP is used, as it seems that + * IOCP refuses to do MSG_PEEK when WSARecv() is called without + * OVERLAP structure. With OpenSSL it gives this error: + * error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version + * number + * + * flags = 0 + */ + flags = PJ_IOQUEUE_ALWAYS_ASYNC; } /* Read next packet from the network. Remember, we need to use -- cgit v1.2.3