From 87657b036f1cdc5bb8ec8a71b962d54a9af7ae6e Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Tue, 8 Jun 2010 17:58:23 +0000 Subject: [PATCH] 2010-06-08 19:58 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/rtl/hbsocket.c ! added missing code to duplicate IP6 address passed explicitly to hb_socketResolveAddr() - thanks to Mindaugas for reporting the problem --- harbour/ChangeLog | 6 ++++++ harbour/src/rtl/hbsocket.c | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 70d778e78d..3a4783679e 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,12 @@ The license applies to all entries newer than 2009-04-28. */ + +2010-06-08 19:58 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/rtl/hbsocket.c + ! added missing code to duplicate IP6 address passed explicitly + to hb_socketResolveAddr() - thanks to Mindaugas for reporting + the problem 2010-06-08 09:21 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + contrib/hbide/resources/idepreferences.png + Icon for "hbIDE Setup" option. diff --git a/harbour/src/rtl/hbsocket.c b/harbour/src/rtl/hbsocket.c index 0aa12a9797..c919ad3a53 100644 --- a/harbour/src/rtl/hbsocket.c +++ b/harbour/src/rtl/hbsocket.c @@ -2802,6 +2802,16 @@ char * hb_socketResolveAddr( const char * szAddr, int af ) #if defined( HB_HAS_INET_PTON ) struct in6_addr sin; fTrans = inet_pton( AF_INET6, szAddr, &sin ) > 0; + if( fTrans ) + { +# if defined( HB_HAS_INET_NTOP ) + char buf[ INET6_ADDRSTRLEN ]; + szAddr = inet_ntop( AF_INET6, &sin, buf, sizeof( buf ) ); +#else + int iTODO; +# endif + szResult = hb_strdup( szAddr ); + } #else int iTODO; fTrans = HB_FALSE;