From: Huw Davies huw@codeweavers.com
Signed-off-by: Huw Davies huw@codeweavers.com --- dlls/nsiproxy.sys/device.c | 4 +++- dlls/nsiproxy.sys/icmp_echo.c | 6 +++--- dlls/nsiproxy.sys/nsiproxy_private.h | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/dlls/nsiproxy.sys/device.c b/dlls/nsiproxy.sys/device.c index aa030fa459c..7aba1f0c36f 100644 --- a/dlls/nsiproxy.sys/device.c +++ b/dlls/nsiproxy.sys/device.c @@ -366,6 +366,7 @@ static void handle_queued_send_echo( IRP *irp ) { struct nsiproxy_icmp_echo *in = (struct nsiproxy_icmp_echo *)irp->AssociatedIrp.SystemBuffer; struct icmp_send_echo_params params; + icmp_handle handle; NTSTATUS status;
TRACE( "\n" ); @@ -376,6 +377,7 @@ static void handle_queued_send_echo( IRP *irp ) params.ttl = in->ttl; params.tos = in->tos; params.dst = &in->dst; + params.handle = &handle;
status = nsiproxy_call( icmp_send_echo, ¶ms ); TRACE( "icmp_send_echo rets %08lx\n", status ); @@ -389,7 +391,7 @@ static void handle_queued_send_echo( IRP *irp ) } else { - irp_set_icmp_handle( irp, params.handle ); + irp_set_icmp_handle( irp, handle ); RtlQueueWorkItem( listen_thread_proc, irp, WT_EXECUTELONGFUNCTION ); } } diff --git a/dlls/nsiproxy.sys/icmp_echo.c b/dlls/nsiproxy.sys/icmp_echo.c index dda19915fe7..e92fa4394c1 100644 --- a/dlls/nsiproxy.sys/icmp_echo.c +++ b/dlls/nsiproxy.sys/icmp_echo.c @@ -659,9 +659,9 @@ NTSTATUS icmp_send_echo( void *args ) return STATUS_SUCCESS; }
- params->handle = handle_alloc( data ); - if (!params->handle) icmp_data_free( data ); - return params->handle ? STATUS_PENDING : STATUS_NO_MEMORY; + *params->handle = handle_alloc( data ); + if (!*params->handle) icmp_data_free( data ); + return *params->handle ? STATUS_PENDING : STATUS_NO_MEMORY; }
static int get_timeout( LARGE_INTEGER start, UINT timeout ) diff --git a/dlls/nsiproxy.sys/nsiproxy_private.h b/dlls/nsiproxy.sys/nsiproxy_private.h index a62a0eebda8..241106fe228 100644 --- a/dlls/nsiproxy.sys/nsiproxy_private.h +++ b/dlls/nsiproxy.sys/nsiproxy_private.h @@ -45,7 +45,7 @@ struct icmp_send_echo_params void *request, *reply; UINT request_size, reply_len; BYTE bits, ttl, tos; - icmp_handle handle; + icmp_handle *handle; };
/* output for IOCTL_NSIPROXY_WINE_ICMP_ECHO - cf. ICMP_ECHO_REPLY */