From 0a46c3e12b4f03365d7cbdaf6186be923525944a Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 12 Jul 2011 14:09:37 +0000 Subject: [PATCH] 2011-07-12 16:06 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbssl/ssl.c * previous patch modified along with Przemek's suggestion to also RTE for -1 values passed --- harbour/ChangeLog | 5 +++++ harbour/contrib/hbssl/ssl.c | 18 ++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 2ee76afb30..8f3d31b23a 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,11 @@ The license applies to all entries newer than 2009-04-28. */ +2011-07-12 16:06 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbssl/ssl.c + * previous patch modified along with Przemek's suggestion + to also RTE for -1 values passed + 2011-07-12 16:02 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/macro/macrolex.c ! added missing YY token assignment I removed by mistake in last diff --git a/harbour/contrib/hbssl/ssl.c b/harbour/contrib/hbssl/ssl.c index a5a0d1dcc9..5b34bd4238 100644 --- a/harbour/contrib/hbssl/ssl.c +++ b/harbour/contrib/hbssl/ssl.c @@ -391,12 +391,14 @@ HB_FUNC( SSL_TOTAL_RENEGOTIATIONS ) HB_FUNC( SSL_SET_FD ) { - if( hb_SSL_is( 1 ) && HB_ISNUM( 2 ) ) + int iSD; + + if( hb_SSL_is( 1 ) && ( iSD = hb_parnidef( 2, -1 ) ) != -1 ) { SSL * ssl = hb_SSL_par( 1 ); if( ssl ) - hb_retni( SSL_set_fd( ssl, hb_parni( 2 ) ) ); + hb_retni( SSL_set_fd( ssl, iSD ) ); } else hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -404,12 +406,14 @@ HB_FUNC( SSL_SET_FD ) HB_FUNC( SSL_SET_RFD ) { - if( hb_SSL_is( 1 ) && HB_ISNUM( 2 ) ) + int iSD; + + if( hb_SSL_is( 1 ) && ( iSD = hb_parnidef( 2, -1 ) ) != -1 ) { SSL * ssl = hb_SSL_par( 1 ); if( ssl ) - hb_retni( SSL_set_rfd( ssl, hb_parni( 2 ) ) ); + hb_retni( SSL_set_rfd( ssl, iSD ) ); } else hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -417,12 +421,14 @@ HB_FUNC( SSL_SET_RFD ) HB_FUNC( SSL_SET_WFD ) { - if( hb_SSL_is( 1 ) && HB_ISNUM( 2 ) ) + int iSD; + + if( hb_SSL_is( 1 ) && ( iSD = hb_parnidef( 2, -1 ) ) != -1 ) { SSL * ssl = hb_SSL_par( 1 ); if( ssl ) - hb_retni( SSL_set_wfd( ssl, hb_parni( 2 ) ) ); + hb_retni( SSL_set_wfd( ssl, iSD ) ); } else hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );