Do a protocol error instead of crashing if the reply fd has not been

set.
This commit is contained in:
Alexandre Julliard 2004-02-05 01:48:02 +00:00
parent ff49652ef6
commit a5f816c6d3
1 changed files with 8 additions and 4 deletions

View File

@ -273,10 +273,14 @@ static void call_req_handler( struct thread *thread )
req_handlers[req]( &current->req, &reply );
if (current)
{
reply.reply_header.error = current->error;
reply.reply_header.reply_size = current->reply_size;
if (debug_level) trace_reply( req, &reply );
send_reply( &reply );
if (current->reply_fd)
{
reply.reply_header.error = current->error;
reply.reply_header.reply_size = current->reply_size;
if (debug_level) trace_reply( req, &reply );
send_reply( &reply );
}
else fatal_protocol_error( current, "no reply fd for request %d\n", req );
}
current = NULL;
return;