Skip to content

Commit fd460fd

Browse files
committed
[RPCRT4]
- do not wait for other threads in DLL_PROCESS_DETACH - fix handle leak - remove debug code svn path=/trunk/; revision=53271
1 parent 3305cfa commit fd460fd

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

reactos/dll/win32/rpcrt4/rpc_server.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,8 +1071,6 @@ void RPCRT4_destroy_all_protseqs(void)
10711071
EnterCriticalSection(&server_cs);
10721072
LIST_FOR_EACH_ENTRY_SAFE(cps, cursor2, &protseqs, RpcServerProtseq, entry)
10731073
{
1074-
if (listen_count != 0)
1075-
RPCRT4_sync_with_server_thread(cps);
10761074
destroy_serverprotoseq(cps);
10771075
}
10781076
LeaveCriticalSection(&server_cs);

reactos/dll/win32/rpcrt4/rpc_transport.c

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,6 @@
103103

104104
WINE_DEFAULT_DEBUG_CHANNEL(rpc);
105105

106-
#undef ERR
107-
#define ERR FIXME
108-
109106
static RPC_STATUS RPCRT4_SpawnConnection(RpcConnection** Connection, RpcConnection* OldConnection);
110107

111108
/**** ncacn_np support ****/
@@ -225,21 +222,13 @@ static RPC_STATUS rpcrt4_conn_open_pipe(RpcConnection *Connection, LPCSTR pname,
225222
if (pipe != INVALID_HANDLE_VALUE) break;
226223
err = GetLastError();
227224
if (err == ERROR_PIPE_BUSY) {
228-
ERR("connection to %s failed, error=%x\n", pname, err);
225+
TRACE("connection failed, error=%x\n", err);
229226
return RPC_S_SERVER_TOO_BUSY;
230227
}
231-
if(wait) ERR("Waiting for pipe instance");
232-
if(wait)
233-
{
234-
if (!WaitNamedPipeA(pname, NMPWAIT_WAIT_FOREVER)) {
235-
err = GetLastError();
236-
ERR("connection to %s failed, error=%x, wait %x\n", pname, err, wait);
237-
return RPC_S_SERVER_UNAVAILABLE;
238-
}
239-
else
240-
{
241-
ERR("Pipe Instance Ready!!!!!!!!!!!!!!!!!!\n");
242-
}
228+
if (!wait || !WaitNamedPipeA(pname, NMPWAIT_WAIT_FOREVER)) {
229+
err = GetLastError();
230+
WARN("connection failed, error=%x\n", err);
231+
return RPC_S_SERVER_UNAVAILABLE;
243232
}
244233
}
245234

@@ -469,6 +458,7 @@ static int rpcrt4_conn_np_write(RpcConnection *Connection,
469458
bytes_left -= bytes_written;
470459
buf += bytes_written;
471460
}
461+
CloseHandle(ovl.hEvent);
472462
return ret ? count : -1;
473463
}
474464

0 commit comments

Comments
 (0)