rpcrt4: Use correct count in rpcrt4_conn_np_write.
count is the total count passed into rpcrt4_conn_np_write. If WriteFile does a partial write it would end up writing too much subsequent times through the loop. All tests pass as before.
This commit is contained in:
parent
95c2801784
commit
764cf334d6
|
@ -392,7 +392,7 @@ static int rpcrt4_conn_np_write(RpcConnection *Connection,
|
|||
while (bytes_left)
|
||||
{
|
||||
DWORD bytes_written;
|
||||
ret = WriteFile(npc->pipe, buf, count, &bytes_written, NULL);
|
||||
ret = WriteFile(npc->pipe, buf, bytes_left, &bytes_written, NULL);
|
||||
if (!ret || !bytes_written)
|
||||
break;
|
||||
bytes_left -= bytes_written;
|
||||
|
|
Loading…
Reference in New Issue