Author: jgardou
Date: Tue Aug 16 20:00:18 2011
New Revision: 53271
URL:
http://svn.reactos.org/svn/reactos?rev=53271&view=rev
Log:
[RPCRT4]
- do not wait for other threads in DLL_PROCESS_DETACH
- fix handle leak
- remove debug code
Modified:
trunk/reactos/dll/win32/rpcrt4/rpc_server.c
trunk/reactos/dll/win32/rpcrt4/rpc_transport.c
Modified: trunk/reactos/dll/win32/rpcrt4/rpc_server.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/rpc_serve…
==============================================================================
--- trunk/reactos/dll/win32/rpcrt4/rpc_server.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/rpcrt4/rpc_server.c [iso-8859-1] Tue Aug 16 20:00:18 2011
@@ -1071,8 +1071,6 @@
EnterCriticalSection(&server_cs);
LIST_FOR_EACH_ENTRY_SAFE(cps, cursor2, &protseqs, RpcServerProtseq, entry)
{
- if (listen_count != 0)
- RPCRT4_sync_with_server_thread(cps);
destroy_serverprotoseq(cps);
}
LeaveCriticalSection(&server_cs);
Modified: trunk/reactos/dll/win32/rpcrt4/rpc_transport.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/rpc_trans…
==============================================================================
--- trunk/reactos/dll/win32/rpcrt4/rpc_transport.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/rpcrt4/rpc_transport.c [iso-8859-1] Tue Aug 16 20:00:18 2011
@@ -103,9 +103,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(rpc);
-#undef ERR
-#define ERR FIXME
-
static RPC_STATUS RPCRT4_SpawnConnection(RpcConnection** Connection, RpcConnection*
OldConnection);
/**** ncacn_np support ****/
@@ -225,21 +222,13 @@
if (pipe != INVALID_HANDLE_VALUE) break;
err = GetLastError();
if (err == ERROR_PIPE_BUSY) {
- ERR("connection to %s failed, error=%x\n", pname, err);
+ TRACE("connection failed, error=%x\n", err);
return RPC_S_SERVER_TOO_BUSY;
}
- if(wait) ERR("Waiting for pipe instance");
- if(wait)
- {
- if (!WaitNamedPipeA(pname, NMPWAIT_WAIT_FOREVER)) {
- err = GetLastError();
- ERR("connection to %s failed, error=%x, wait %x\n", pname, err, wait);
- return RPC_S_SERVER_UNAVAILABLE;
- }
- else
- {
- ERR("Pipe Instance Ready!!!!!!!!!!!!!!!!!!\n");
- }
+ if (!wait || !WaitNamedPipeA(pname, NMPWAIT_WAIT_FOREVER)) {
+ err = GetLastError();
+ WARN("connection failed, error=%x\n", err);
+ return RPC_S_SERVER_UNAVAILABLE;
}
}
@@ -469,6 +458,7 @@
bytes_left -= bytes_written;
buf += bytes_written;
}
+ CloseHandle(ovl.hEvent);
return ret ? count : -1;
}