- do not wait for other threads in DLL_PROCESS_DETACH
- fix handle leak
- remove debug code

svn path=/trunk/; revision=53271
This commit is contained in:
Jérôme Gardou 2011-08-16 20:00:18 +00:00
parent 3305cfabfb
commit fd460fd4a1
2 changed files with 6 additions and 18 deletions

View file

@ -1071,8 +1071,6 @@ void RPCRT4_destroy_all_protseqs(void)
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);

View file

@ -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 @@ static RPC_STATUS rpcrt4_conn_open_pipe(RpcConnection *Connection, LPCSTR pname,
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 @@ static int rpcrt4_conn_np_write(RpcConnection *Connection,
bytes_left -= bytes_written;
buf += bytes_written;
}
CloseHandle(ovl.hEvent);
return ret ? count : -1;
}