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
2f0de6a1
Commit
2f0de6a1
authored
Oct 06, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 07, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Use NtReadFile in rpcrt4_conn_np_read.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a6ef2386
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
rpc_transport.c
dlls/rpcrt4/rpc_transport.c
+10
-10
No files found.
dlls/rpcrt4/rpc_transport.c
View file @
2f0de6a1
...
...
@@ -77,6 +77,8 @@
# define ioctlsocket ioctl
#endif
/* defined(__MINGW32__) || defined (_MSC_VER) */
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
...
...
@@ -445,22 +447,20 @@ static int rpcrt4_conn_np_read(RpcConnection *Connection,
void
*
buffer
,
unsigned
int
count
)
{
RpcConnection_np
*
npc
=
(
RpcConnection_np
*
)
Connection
;
IO_STATUS_BLOCK
io_status
;
char
*
buf
=
buffer
;
BOOL
ret
=
TRUE
;
unsigned
int
bytes_left
=
count
;
NTSTATUS
status
;
while
(
bytes_left
)
{
DWORD
bytes_read
;
ret
=
ReadFile
(
npc
->
pipe
,
buf
,
bytes_left
,
&
bytes_read
,
NULL
);
if
(
!
ret
&&
GetLastError
()
==
ERROR_MORE_DATA
)
ret
=
TRUE
;
if
(
!
ret
||
!
bytes_read
)
break
;
bytes_left
-=
bytes_read
;
buf
+=
bytes_read
;
status
=
NtReadFile
(
npc
->
pipe
,
NULL
,
NULL
,
NULL
,
&
io_status
,
buf
,
bytes_left
,
NULL
,
NULL
);
if
(
status
&&
status
!=
STATUS_BUFFER_OVERFLOW
)
return
-
1
;
bytes_left
-=
io_status
.
Information
;
buf
+=
io_status
.
Information
;
}
return
ret
?
count
:
-
1
;
return
count
;
}
static
int
rpcrt4_conn_np_write
(
RpcConnection
*
Connection
,
...
...
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