Commit 5cd42975 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

nsiproxy: Fill the reply when it's not pending on the unix-side.

parent 5e8bd4d3
......@@ -353,13 +353,13 @@ static DWORD WINAPI listen_thread_proc( void *arg )
static void handle_queued_send_echo( IRP *irp )
{
struct nsiproxy_icmp_echo *in = (struct nsiproxy_icmp_echo *)irp->AssociatedIrp.SystemBuffer;
struct nsiproxy_icmp_echo_reply *reply = (struct nsiproxy_icmp_echo_reply *)irp->AssociatedIrp.SystemBuffer;
struct icmp_send_echo_params params;
NTSTATUS status;
TRACE( "\n" );
params.request = in->data + ((in->opt_size + 3) & ~3);
params.request_size = in->req_size;
params.reply = irp->AssociatedIrp.SystemBuffer;
params.ttl = in->ttl;
params.tos = in->tos;
params.dst = &in->dst;
......@@ -371,11 +371,7 @@ static void handle_queued_send_echo( IRP *irp )
{
irp->IoStatus.Status = status;
if (status == STATUS_SUCCESS)
{
memset( reply, 0, sizeof(*reply) );
reply->status = params.ip_status;
irp->IoStatus.Information = sizeof(*reply);
}
irp->IoStatus.Information = params.reply_len;
IoCompleteRequest( irp, IO_NO_INCREMENT );
}
else
......
......@@ -586,7 +586,7 @@ NTSTATUS icmp_send_echo( void *args )
{
TRACE( "sendto() rets %d errno %d\n", ret, errno );
icmp_data_free( data );
params->ip_status = errno_to_ip_status( errno );
params->reply_len = data->ops->set_reply_ip_status( errno_to_ip_status( errno ), params->reply );
return STATUS_SUCCESS;
}
......
......@@ -28,9 +28,8 @@ struct icmp_listen_params
struct icmp_send_echo_params
{
SOCKADDR_INET *dst;
void *request;
DWORD request_size;
void *request, *reply;
DWORD request_size, reply_len;
BYTE ttl, tos;
HANDLE handle;
ULONG ip_status;
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment