Commit cdb3cdf3 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

- Don't pass the PROFILE_SERVER flag in to CreateNamedPipe as it is

bogus. - Call FlushFileBuffers to make sure the other end of the pipe doesn't get cut off prematurely. - Don't call CancelIo as we should never have async I/O pending.
parent cdc67720
......@@ -142,7 +142,7 @@ RPC_STATUS RPCRT4_OpenConnection(RpcConnection* Connection)
pname = HeapAlloc(GetProcessHeap(), 0, strlen(prefix) + strlen(Connection->Endpoint) + 1);
strcat(strcpy(pname, prefix), Connection->Endpoint);
TRACE("listening on %s\n", pname);
Connection->conn = CreateNamedPipeA(pname, PROFILE_SERVER | PIPE_ACCESS_DUPLEX,
Connection->conn = CreateNamedPipeA(pname, PIPE_ACCESS_DUPLEX,
PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE, PIPE_UNLIMITED_INSTANCES,
RPC_MAX_PACKET_SIZE, RPC_MAX_PACKET_SIZE, 5000, NULL);
HeapFree(GetProcessHeap(), 0, pname);
......@@ -166,7 +166,7 @@ RPC_STATUS RPCRT4_OpenConnection(RpcConnection* Connection)
pname = HeapAlloc(GetProcessHeap(), 0, strlen(prefix) + strlen(Connection->Endpoint) + 1);
strcat(strcpy(pname, prefix), Connection->Endpoint);
TRACE("listening on %s\n", pname);
Connection->conn = CreateNamedPipeA(pname, PROFILE_SERVER | PIPE_ACCESS_DUPLEX,
Connection->conn = CreateNamedPipeA(pname, PIPE_ACCESS_DUPLEX,
PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, PIPE_UNLIMITED_INSTANCES,
RPC_MAX_PACKET_SIZE, RPC_MAX_PACKET_SIZE, 5000, NULL);
HeapFree(GetProcessHeap(), 0, pname);
......@@ -274,7 +274,7 @@ RPC_STATUS RPCRT4_CloseConnection(RpcConnection* Connection)
{
TRACE("(Connection == ^%p)\n", Connection);
if (Connection->conn) {
CancelIo(Connection->conn);
FlushFileBuffers(Connection->conn);
CloseHandle(Connection->conn);
Connection->conn = 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment