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
This commit is contained in:
Przemyslaw Czerpak
2010-12-15 00:53:04 +00:00
parent 36fbb5355d
commit 32ab8b0eaf
2 changed files with 12 additions and 2 deletions

View File

@@ -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.

View File

@@ -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 );