Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
be0765ac
Commit
be0765ac
authored
Oct 05, 2021
by
Huw Davies
Committed by
Alexandre Julliard
Oct 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nsiproxy: Pass the listen request off to a separate thread.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4ba31162
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
4 deletions
+32
-4
device.c
dlls/nsiproxy.sys/device.c
+32
-4
No files found.
dlls/nsiproxy.sys/device.c
View file @
be0765ac
...
...
@@ -178,6 +178,16 @@ static NTSTATUS nsiproxy_get_parameter( IRP *irp )
return
status
;
}
static
inline
HANDLE
irp_get_icmp_handle
(
IRP
*
irp
)
{
return
irp
->
Tail
.
Overlay
.
DriverContext
[
0
];
}
static
inline
HANDLE
irp_set_icmp_handle
(
IRP
*
irp
,
HANDLE
handle
)
{
return
InterlockedExchangePointer
(
irp
->
Tail
.
Overlay
.
DriverContext
,
handle
);
}
static
void
WINAPI
icmp_echo_cancel
(
DEVICE_OBJECT
*
device
,
IRP
*
irp
)
{
TRACE
(
"device %p, irp %p.
\n
"
,
device
,
irp
);
...
...
@@ -293,6 +303,26 @@ static int add_device( DRIVER_OBJECT *driver )
return
1
;
}
static
DWORD
WINAPI
listen_thread_proc
(
void
*
arg
)
{
IRP
*
irp
=
arg
;
TRACE
(
"
\n
"
);
/* FIXME */
EnterCriticalSection
(
&
nsiproxy_cs
);
nsiproxy_call
(
icmp_close
,
irp_set_icmp_handle
(
irp
,
NULL
)
);
irp
->
IoStatus
.
Status
=
STATUS_NOT_SUPPORTED
;
IoCompleteRequest
(
irp
,
IO_NO_INCREMENT
);
LeaveCriticalSection
(
&
nsiproxy_cs
);
return
0
;
}
static
void
handle_queued_send_echo
(
IRP
*
irp
)
{
struct
nsiproxy_icmp_echo
*
in
=
(
struct
nsiproxy_icmp_echo
*
)
irp
->
AssociatedIrp
.
SystemBuffer
;
...
...
@@ -323,10 +353,8 @@ static void handle_queued_send_echo( IRP *irp )
}
else
{
/* FIXME */
nsiproxy_call
(
icmp_close
,
params
.
handle
);
irp
->
IoStatus
.
Status
=
STATUS_NOT_SUPPORTED
;
IoCompleteRequest
(
irp
,
IO_NO_INCREMENT
);
irp_set_icmp_handle
(
irp
,
params
.
handle
);
RtlQueueWorkItem
(
listen_thread_proc
,
irp
,
WT_EXECUTELONGFUNCTION
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment