ws2_32: WSACleanup cleans up open sockets (OSX only)

Henri Verbeet hverbeet at gmail.com
Fri Aug 28 07:30:13 CDT 2015


On 28 August 2015 at 05:46, Matt Durgavich <mattdurgavich at gmail.com> wrote:
> +DECL_HANDLER(close_all_sockets)
You'll want to just move this to sock.c and avoid making sock_ops
available outside sock.c. You may want to change the request name to
something along the lines of "close_process_sockets", since it only
closes sockets for the current process, not all sockets the server
knows about.

> +{
> +    obj_handle_t sock;
> +    UINT index = 0;
"unsigned int" would be more appropriate.

> +    while ( (sock = enumerate_handles(current->process, &sock_ops, &index))
> )
> +    {
> +        close_handle(current->process, sock);
> +    }
> +}
> +
The formatting here is a bit different from the rest of the server.
(I.e., spaces around function parameter lists, no spaces around
control statement conditions.)



More information about the wine-devel mailing list