diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 1aac6a7ee3..2aa58b8643 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,14 @@ The license applies to all entries newer than 2009-04-28. */ +2010-12-15 01:52 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/contrib/hbssl/hbssl.c + ! fixed HB_SSL_READ_ALL() and HB_SSL_READ_LINE() to not call + hb_socketSelectRead() with wrong socket descriptors - it was + causing GPF on some platforms + * use SSL_get_rfd() instead of SSL_get_fd() to extract socket + read descriptor + 2010-12-12 23:12 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbssl/tests/encode.prg ! Fixed warning. diff --git a/harbour/contrib/hbssl/hbssl.c b/harbour/contrib/hbssl/hbssl.c index fbcfeca17d..4cad0597ad 100644 --- a/harbour/contrib/hbssl/hbssl.c +++ b/harbour/contrib/hbssl/hbssl.c @@ -78,9 +78,10 @@ HB_FUNC( HB_SSL_READ_ALL ) { char buffer[ 1 ]; int iLen; + int sd = SSL_get_rfd( ssl ); if( SSL_pending( ssl ) || - hb_socketSelectRead( ( HB_SOCKET ) SSL_get_fd( ssl ), iTimeout ) ) + ( sd >= 0 && hb_socketSelectRead( ( HB_SOCKET ) sd, iTimeout ) ) ) { iLen = SSL_read( ssl, buffer, 1 ); @@ -147,9 +148,10 @@ HB_FUNC( HB_SSL_READ_LINE ) { char buffer[ 1 ]; int iLen; + int sd = SSL_get_rfd( ssl ); if( SSL_pending( ssl ) || - hb_socketSelectRead( ( HB_SOCKET ) SSL_get_fd( ssl ), iTimeout ) ) + ( sd >= 0 && hb_socketSelectRead( ( HB_SOCKET ) sd, iTimeout ) ) ) { iLen = SSL_read( ssl, buffer, 1 );