Hello,
There is a problem in the source code of the InetServer(...) fucntion - in
/vm/inet.c
IMHO the function has four input parameters, as described in the xHarbour
documentation.
At present the source code is handling three input parameters, but the
SECOND input parameter is used for two different purposes.
Below are the relevant code snippets:
...
HB_FUNC( INETSERVER )
{
// here the second input parameter is supposed to be a pointer to a socket
PHB_ITEM pSocket = hb_param( 2, HB_IT_POINTER );
HB_SOCKET_STRUCT *Socket = (pSocket ? (HB_SOCKET_STRUCT *)
hb_itemGetPtr(pSocket) : NULL );
...
// here the second input parameter is supposed to be an IP address,
//.......................V
if( ! ISCHAR( 2 ) )
{
Socket->remote.sin_addr.s_addr = INADDR_ANY;
}
else
{
//...............................................................................................V
Socket->remote.sin_addr.s_addr = inet_addr( hb_parcx( 2 ) );
}
//.............................V......................V...I think this is
about the FOURTH input parameter
iListen = ISNUM( 3 ) ? hb_parni( 3 ) : 10;
.....
Ella
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers