mirror of
https://github.com/reactos/wine.git
synced 2024-11-29 06:30:37 +00:00
Added server_call_noerr function that avoids touching the last error.
This commit is contained in:
parent
d92870fd49
commit
af04ebe4bb
@ -922,6 +922,10 @@ enum request
|
||||
|
||||
/* client communication functions */
|
||||
|
||||
extern unsigned int server_call_noerr( enum request req );
|
||||
extern unsigned int server_call_fd( enum request req, int fd_out, int *fd_in );
|
||||
extern void server_protocol_error( const char *err, ... );
|
||||
|
||||
/* get a pointer to the request buffer */
|
||||
static inline void * WINE_UNUSED get_req_buffer(void)
|
||||
{
|
||||
@ -934,9 +938,13 @@ static inline int WINE_UNUSED server_remaining( const void *ptr )
|
||||
return (char *)NtCurrentTeb()->buffer + NtCurrentTeb()->buffer_size - (char *)ptr;
|
||||
}
|
||||
|
||||
extern unsigned int server_call( enum request req );
|
||||
extern unsigned int server_call_fd( enum request req, int fd_out, int *fd_in );
|
||||
extern void server_protocol_error( const char *err, ... );
|
||||
/* do a server call and set the last error code */
|
||||
static inline int server_call( enum request req )
|
||||
{
|
||||
unsigned int res = server_call_noerr( req );
|
||||
if (res) SetLastError( res );
|
||||
return res;
|
||||
}
|
||||
|
||||
extern int CLIENT_InitServer(void);
|
||||
extern int CLIENT_SetDebug( int level );
|
||||
|
@ -225,18 +225,14 @@ static unsigned int wait_reply_fd( int *fd )
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* server_call
|
||||
* server_call_noerr
|
||||
*
|
||||
* Perform a server call.
|
||||
*/
|
||||
unsigned int server_call( enum request req )
|
||||
unsigned int server_call_noerr( enum request req )
|
||||
{
|
||||
unsigned int res;
|
||||
|
||||
send_request( req );
|
||||
res = wait_reply();
|
||||
if (res) SetLastError( res );
|
||||
return res; /* error code */
|
||||
return wait_reply();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user