forked from Mirrors/wine-wine
parent
f7b47f7a5c
commit
cb6c83dfc3
|
@ -136,9 +136,13 @@ RPC_STATUS RPCRT4_DestroyConnection(RpcConnection* Connection)
|
||||||
|
|
||||||
EnterCriticalSection(&conn_cache_cs);
|
EnterCriticalSection(&conn_cache_cs);
|
||||||
PrevConnection = conn_cache;
|
PrevConnection = conn_cache;
|
||||||
while (PrevConnection && PrevConnection->Next != Connection)
|
if (PrevConnection == Connection) {
|
||||||
PrevConnection = PrevConnection->Next;
|
conn_cache = Connection->Next;
|
||||||
if (PrevConnection) PrevConnection->Next = Connection->Next;
|
} else {
|
||||||
|
while (PrevConnection && PrevConnection->Next != Connection)
|
||||||
|
PrevConnection = PrevConnection->Next;
|
||||||
|
if (PrevConnection) PrevConnection->Next = Connection->Next;
|
||||||
|
}
|
||||||
LeaveCriticalSection(&conn_cache_cs);
|
LeaveCriticalSection(&conn_cache_cs);
|
||||||
|
|
||||||
RPCRT4_CloseConnection(Connection);
|
RPCRT4_CloseConnection(Connection);
|
||||||
|
|
Loading…
Reference in New Issue