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
6d50cfca
Commit
6d50cfca
authored
Sep 22, 2014
by
André Hentschel
Committed by
Alexandre Julliard
Sep 23, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use a dynamic buffer for change notification data.
parent
95763d91
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
directory.c
dlls/ntdll/directory.c
+7
-4
No files found.
dlls/ntdll/directory.c
View file @
6d50cfca
...
...
@@ -3307,8 +3307,10 @@ struct read_changes_info
HANDLE
FileHandle
;
PVOID
Buffer
;
ULONG
BufferSize
;
ULONG
data_size
;
PIO_APC_ROUTINE
apc
;
void
*
apc_arg
;
char
data
[
1
];
};
/* callback for ioctl user APC */
...
...
@@ -3322,14 +3324,13 @@ static void WINAPI read_changes_user_apc( void *arg, IO_STATUS_BLOCK *io, ULONG
static
NTSTATUS
read_changes_apc
(
void
*
user
,
PIO_STATUS_BLOCK
iosb
,
NTSTATUS
status
,
void
**
apc
)
{
struct
read_changes_info
*
info
=
user
;
char
data
[
PATH_MAX
];
NTSTATUS
ret
;
int
size
;
SERVER_START_REQ
(
read_change
)
{
req
->
handle
=
wine_server_obj_handle
(
info
->
FileHandle
);
wine_server_set_reply
(
req
,
data
,
PATH_MAX
);
wine_server_set_reply
(
req
,
info
->
data
,
info
->
data_size
);
ret
=
wine_server_call
(
req
);
size
=
wine_server_reply_size
(
reply
);
}
...
...
@@ -3340,7 +3341,7 @@ static NTSTATUS read_changes_apc( void *user, PIO_STATUS_BLOCK iosb, NTSTATUS st
PFILE_NOTIFY_INFORMATION
pfni
=
info
->
Buffer
;
int
i
,
left
=
info
->
BufferSize
;
DWORD
*
last_entry_offset
=
NULL
;
struct
filesystem_event
*
event
=
(
struct
filesystem_event
*
)
data
;
struct
filesystem_event
*
event
=
(
struct
filesystem_event
*
)
info
->
data
;
while
(
size
&&
left
>=
sizeof
(
*
pfni
))
{
...
...
@@ -3413,6 +3414,7 @@ NtNotifyChangeDirectoryFile( HANDLE FileHandle, HANDLE Event,
{
struct
read_changes_info
*
info
;
NTSTATUS
status
;
ULONG
size
=
max
(
4096
,
BufferSize
);
ULONG_PTR
cvalue
=
ApcRoutine
?
0
:
(
ULONG_PTR
)
ApcContext
;
TRACE
(
"%p %p %p %p %p %p %u %u %d
\n
"
,
...
...
@@ -3425,7 +3427,7 @@ NtNotifyChangeDirectoryFile( HANDLE FileHandle, HANDLE Event,
if
(
CompletionFilter
==
0
||
(
CompletionFilter
&
~
FILE_NOTIFY_ALL
))
return
STATUS_INVALID_PARAMETER
;
info
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
sizeof
*
info
);
info
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
offsetof
(
struct
read_changes_info
,
data
[
size
]
)
);
if
(
!
info
)
return
STATUS_NO_MEMORY
;
...
...
@@ -3434,6 +3436,7 @@ NtNotifyChangeDirectoryFile( HANDLE FileHandle, HANDLE Event,
info
->
BufferSize
=
BufferSize
;
info
->
apc
=
ApcRoutine
;
info
->
apc_arg
=
ApcContext
;
info
->
data_size
=
size
;
SERVER_START_REQ
(
read_directory_changes
)
{
...
...
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