Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
a851c880
Commit
a851c880
authored
Aug 18, 2003
by
Eric Pouech
Committed by
Alexandre Julliard
Aug 18, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Regression fixes for Nt{Read|Write}File:
- actually block in TIMEOUT mode - in overlapped mode, if any data is already available then process it without returning a pending status code
parent
2caec6fe
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
file.c
dlls/ntdll/file.c
+26
-0
No files found.
dlls/ntdll/file.c
View file @
a851c880
...
@@ -416,6 +416,19 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
...
@@ -416,6 +416,19 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
ret
=
register_new_async
(
&
ovp
->
async
);
ret
=
register_new_async
(
&
ovp
->
async
);
if
(
ret
!=
STATUS_SUCCESS
)
if
(
ret
!=
STATUS_SUCCESS
)
return
ret
;
return
ret
;
if
(
flags
&
FD_FLAG_TIMEOUT
)
{
NtWaitForSingleObject
(
hEvent
,
TRUE
,
NULL
);
NtClose
(
hEvent
);
}
else
{
LARGE_INTEGER
timeout
;
/* let some APC be run, this will read some already pending data */
timeout
.
s
.
LowPart
=
timeout
.
s
.
HighPart
=
0
;
NtDelayExecution
(
TRUE
,
&
timeout
);
}
return
io_status
->
u
.
Status
;
return
io_status
->
u
.
Status
;
}
}
switch
(
type
)
switch
(
type
)
...
@@ -577,6 +590,19 @@ NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent,
...
@@ -577,6 +590,19 @@ NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent,
ret
=
register_new_async
(
&
ovp
->
async
);
ret
=
register_new_async
(
&
ovp
->
async
);
if
(
ret
!=
STATUS_SUCCESS
)
if
(
ret
!=
STATUS_SUCCESS
)
return
ret
;
return
ret
;
if
(
flags
&
FD_FLAG_TIMEOUT
)
{
NtWaitForSingleObject
(
hEvent
,
TRUE
,
NULL
);
NtClose
(
hEvent
);
}
else
{
LARGE_INTEGER
timeout
;
/* let some APC be run, this will write as much data as possible */
timeout
.
s
.
LowPart
=
timeout
.
s
.
HighPart
=
0
;
NtDelayExecution
(
TRUE
,
&
timeout
);
}
return
io_status
->
u
.
Status
;
return
io_status
->
u
.
Status
;
}
}
switch
(
type
)
switch
(
type
)
...
...
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