Dan Hipschman : rpcrt4: Use correct count in rpcrt4_conn_np_write.

Alexandre Julliard julliard at winehq.org
Thu Mar 20 09:48:18 CDT 2008

Module: wine
Branch: master
Commit: 764cf334d6aa909a29cf21e4d9a90ce06209598a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=764cf334d6aa909a29cf21e4d9a90ce06209598a

Author: Dan Hipschman <dsh at linux.ucla.edu>
Date:   Wed Mar 19 15:03:00 2008 -0700

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.


 dlls/rpcrt4/rpc_transport.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c
index b02c11d..822807b 100644
--- a/dlls/rpcrt4/rpc_transport.c
+++ b/dlls/rpcrt4/rpc_transport.c
@@ -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)
     bytes_left -= bytes_written;

More information about the wine-cvs mailing list