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 */ +@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 */
+@REPLY
- char ok; /* operation status */
- int value; /* returned value of variable */
+@END
+@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 */
+@REPLY
- char ok; /* operation status */
+@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.