wsock32 conformance test
Juan Lang
juan_lang at yahoo.com
Fri Feb 25 09:38:49 CST 2005
Hey guys, nice work. Minor comments below:
> +/* we often pass this size by reference */
> +int sizeofSOCKADDR_IN = sizeof(SOCKADDR_IN);
When you pass it by reference, you don't reinitialize it after a call that
might modify it, e.g. here:
> + /* get port number */
> + getsockname(*sock, (SOCKADDR *) &tmpAddr, &sizeofSOCKADDR_IN);
I think it'd be safer to declare a local int initialized to
sizeof(SOCKADDR_IN) and pass this by ref instead.
> + for (connIndex = 0; connIndex < NUM_CLIENTS; connIndex++) {
> + /* accept connection */
> + tmpSock = accept(*sock, (SOCKADDR *) &tmpSockAddr,
&sizeofSOCKADDR_IN);
Your indenting's off here. (Do you have to use tabs? Ick.)
> + connection->serverThread.Handle = CreateThread(NULL, 0,
(LPTHREAD_START_ROUTINE) &BlockingServerConnection_Run, connection, 0,
&connection->serverThread.ID);
Please wrap long lines.
> + const int numTests = 3;
Might as well make that static too.
Props for first post :)
--Juan
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the wine-devel
mailing list