diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f8b53c4e1f..7737ff4b8f 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,13 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-07-28 13:24 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/include/Makefile + ! added hbextlng.ch + + * harbour/source/rtl/hbinet.c + ! fixed broadcast addresses wrongly used as default + 2009-07-28 12:37 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * source/rtl/hbinet.c * Struct member 'com' renamed to 'sd' to be in sync. diff --git a/harbour/include/Makefile b/harbour/include/Makefile index 9405df3b50..44c3732e76 100644 --- a/harbour/include/Makefile +++ b/harbour/include/Makefile @@ -80,6 +80,7 @@ PRG_HEADERS=\ hbclass.ch \ hbdebug.ch \ hbextcdp.ch \ + hbextlng.ch \ hbextern.ch \ hbgetcmt.ch \ hbgfx.ch \ diff --git a/harbour/source/rtl/hbinet.c b/harbour/source/rtl/hbinet.c index 170bd6d312..8c9a8bc3af 100644 --- a/harbour/source/rtl/hbinet.c +++ b/harbour/source/rtl/hbinet.c @@ -1104,6 +1104,11 @@ HB_FUNC( HB_INETSERVER ) HB_SOCKET_INIT( socket, pSocket ); /* Creates comm socket */ + if( socket->sd != HB_NO_SOCKET ) + { + hb_socketClose( socket->sd ); + socket->sd = HB_NO_SOCKET; + } socket->sd = hb_socketOpen( HB_SOCK_PF_INET, HB_SOCK_STREAM, 0 ); if( socket->sd == HB_NO_SOCKET ) { @@ -1126,7 +1131,7 @@ HB_FUNC( HB_INETSERVER ) if( socket->remote ) hb_xfree( socket->remote ); if( hb_socketInetAddr( &socket->remote, &socket->remotelen, - szAddress ? szAddress : "255.255.255.255", iPort ) ) + szAddress ? szAddress : "0.0.0.0", iPort ) ) { if( hb_socketBind( socket->sd, socket->remote, socket->remotelen ) == -1 ) { @@ -1344,7 +1349,7 @@ HB_FUNC( HB_INETDGRAMBIND ) if( socket->remote ) hb_xfree( socket->remote ); if( !hb_socketInetAddr( &socket->remote, &socket->remotelen, - szAddress ? szAddress : "255.255.255.255", iPort ) ) + szAddress ? szAddress : "0.0.0.0", iPort ) ) { HB_SOCKET_SET_ERROR( socket ); hb_socketClose( socket->sd );