On Fri, 18 Sep 2009, Tamas TEVESZ wrote:
Hi,
> 440 if( connsd != HB_NO_SOCKET )
> 441 {
> 442 BOOL fOK = FALSE;
> 443 BYTE msgbuf[ 64 ];
> 444
> 445 conn = s_consrvNew( connsd, lsd->rootPath );
> 446
> 447 if( s_srvRecvAll( conn, msgbuf, NETIO_MSGLEN ) == NETIO_MSGLEN &&
> it feels better to, instead of the magic 64, to either use some
> formula that includes NETIO_MSGLEN (say 2 * NETIO_MSGLEN + 16, if
> there is such a formula, or just <some> * NETIO_MSGLEN), or after the
> declaration, assert() that msgbuf needs to be this-and-this in size in
> relation to NETIO_MSGLEN.
> my reason for that is that 64 is a "magic constant", "far" in context
> from where and how it's being used, and using netio_msglen in there
> gives it some context, and is easier to figure out what it is for, and
> what the constraints for it's size are.
It was intentional but I agree that it may cause troubles if someone
tries to modify NETIO in the future. Thank you for information,
I'll change it.
best regards,
Przemek
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour