[PATCH 1/4] server: Add mechanism to store and retrieve information about a socket (try 2).
Vitaliy Margolen
wine-devel at kievinfo.com
Fri Jan 13 08:56:10 CST 2012
On 01/13/2012 12:05 AM, Erich E. Hoover wrote:
> Real Name:
> Erich Hoover
>
> Changelog:
> server: Add mechanism to store and retrieve information about a socket.
>
> +
> +/* Get and set user-accessible socket variables */
> + at REQ(get_socket_variable)
> + obj_handle_t handle; /* handle to the socket */
> + unsigned int varcode; /* variable to return */
> + unsigned int varsize; /* size of variable to return */
> + at REPLY
> + char ok; /* operation status */
> + int value; /* returned value of variable */
> + at END
> +
> + at REQ(set_socket_variable)
> + obj_handle_t handle; /* handle to the socket */
> + unsigned int varcode; /* variable to set */
> + unsigned int varsize; /* size of variable to set */
> + int value; /* value of variable to set */
> + at REPLY
> + char ok; /* operation status */
> + at END
You are not using "ok" parameters in either of the calls. You should use
status returned by wine_server_call_() for things like that.
Also size seems to be redundant here. If it's an int - store it as int on
both sides. This also implies you should use an array instead of struct for
a storage. And drop size checks.
One more thing, keep in mind that time_t is not unsigned int. But long.
Vitaliy.
More information about the wine-devel
mailing list