server: Return an error for invalid requests instead of killing the client process.
This commit is contained in:
parent
ee48e1e3d5
commit
4ec9e110b0
|
@ -52,9 +52,12 @@
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "ntstatus.h"
|
||||||
|
#define WIN32_NO_STATUS
|
||||||
#include "windef.h"
|
#include "windef.h"
|
||||||
#include "winbase.h"
|
#include "winbase.h"
|
||||||
#include "wincon.h"
|
#include "wincon.h"
|
||||||
|
#include "winternl.h"
|
||||||
#include "wine/library.h"
|
#include "wine/library.h"
|
||||||
|
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
|
@ -277,8 +280,10 @@ static void call_req_handler( struct thread *thread )
|
||||||
if (debug_level) trace_request();
|
if (debug_level) trace_request();
|
||||||
|
|
||||||
if (req < REQ_NB_REQUESTS)
|
if (req < REQ_NB_REQUESTS)
|
||||||
{
|
|
||||||
req_handlers[req]( ¤t->req, &reply );
|
req_handlers[req]( ¤t->req, &reply );
|
||||||
|
else
|
||||||
|
set_error( STATUS_NOT_IMPLEMENTED );
|
||||||
|
|
||||||
if (current)
|
if (current)
|
||||||
{
|
{
|
||||||
if (current->reply_fd)
|
if (current->reply_fd)
|
||||||
|
@ -291,9 +296,6 @@ static void call_req_handler( struct thread *thread )
|
||||||
else fatal_protocol_error( current, "no reply fd for request %d\n", req );
|
else fatal_protocol_error( current, "no reply fd for request %d\n", req );
|
||||||
}
|
}
|
||||||
current = NULL;
|
current = NULL;
|
||||||
return;
|
|
||||||
}
|
|
||||||
fatal_protocol_error( current, "bad request %d\n", req );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read a request from a thread */
|
/* read a request from a thread */
|
||||||
|
|
Loading…
Reference in New Issue