diff options
author | Bernard Normier <bernard@zeroc.com> | 2019-07-15 05:14:32 -0400 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2019-07-15 11:14:32 +0200 |
commit | 2e60ce8af12b12a8c1aed18c7bea2413016d4004 (patch) | |
tree | 4f5f578bb99ea4713cbc1d0e57346b6036c70f10 /cpp/src/IceSSL | |
parent | Test script minor warning fixes (diff) | |
download | ice-2e60ce8af12b12a8c1aed18c7bea2413016d4004.tar.bz2 ice-2e60ce8af12b12a8c1aed18c7bea2413016d4004.tar.xz ice-2e60ce8af12b12a8c1aed18c7bea2413016d4004.zip |
Port to AIX with g++, xlC_r and xlclang++ (#434)
Diffstat (limited to 'cpp/src/IceSSL')
-rw-r--r-- | cpp/src/IceSSL/OpenSSLTransceiverI.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cpp/src/IceSSL/OpenSSLTransceiverI.cpp b/cpp/src/IceSSL/OpenSSLTransceiverI.cpp index 8acfe25a67e..d33bb6aaf52 100644 --- a/cpp/src/IceSSL/OpenSSLTransceiverI.cpp +++ b/cpp/src/IceSSL/OpenSSLTransceiverI.cpp @@ -553,6 +553,21 @@ OpenSSL::TransceiverI::read(IceInternal::Buffer& buf) int ret = SSL_read(_ssl, reinterpret_cast<void*>(&*buf.i), packetSize); if(ret <= 0) { +#if defined(_AIX) + // + // WORKAROUND: OpenSSL SSL_read on AIX sometime ends up reporting a error + // with SSL_get_error but there's no error in the error queue. This occurs + // when SSL_read needs more data. So we just return SocketOperationRead in + // this case. + // + if(SSL_get_error(_ssl, ret) == SSL_ERROR_SSL && ERR_peek_error() == 0) + { + if(SSL_want_read(_ssl)) + { + return IceInternal::SocketOperationRead; + } + } +#endif switch(SSL_get_error(_ssl, ret)) { case SSL_ERROR_NONE: |