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
This commit is contained in:
Przemyslaw Czerpak
2009-07-28 11:24:35 +00:00
parent d985b594f5
commit 3472f72ddd
3 changed files with 15 additions and 2 deletions

View File

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

View File

@@ -80,6 +80,7 @@ PRG_HEADERS=\
hbclass.ch \
hbdebug.ch \
hbextcdp.ch \
hbextlng.ch \
hbextern.ch \
hbgetcmt.ch \
hbgfx.ch \

View File

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