rpcrt4: Remove connection from list in RPCRT4_ReleaseConnection.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
812897c8ad
commit
dae30652e6
|
@ -91,6 +91,7 @@ typedef struct _RpcConnection
|
||||||
RPC_SYNTAX_IDENTIFIER ActiveInterface;
|
RPC_SYNTAX_IDENTIFIER ActiveInterface;
|
||||||
USHORT NextCallId;
|
USHORT NextCallId;
|
||||||
struct list protseq_entry;
|
struct list protseq_entry;
|
||||||
|
struct _RpcServerProtseq *protseq;
|
||||||
struct _RpcBinding *server_binding;
|
struct _RpcBinding *server_binding;
|
||||||
} RpcConnection;
|
} RpcConnection;
|
||||||
|
|
||||||
|
|
|
@ -227,6 +227,7 @@ static RPC_STATUS rpcrt4_protseq_ncalrpc_open_endpoint(RpcServerProtseq* protseq
|
||||||
|
|
||||||
EnterCriticalSection(&protseq->cs);
|
EnterCriticalSection(&protseq->cs);
|
||||||
list_add_head(&protseq->listeners, &Connection->protseq_entry);
|
list_add_head(&protseq->listeners, &Connection->protseq_entry);
|
||||||
|
Connection->protseq = protseq;
|
||||||
LeaveCriticalSection(&protseq->cs);
|
LeaveCriticalSection(&protseq->cs);
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
|
@ -288,6 +289,7 @@ static RPC_STATUS rpcrt4_protseq_ncacn_np_open_endpoint(RpcServerProtseq *protse
|
||||||
|
|
||||||
EnterCriticalSection(&protseq->cs);
|
EnterCriticalSection(&protseq->cs);
|
||||||
list_add_head(&protseq->listeners, &Connection->protseq_entry);
|
list_add_head(&protseq->listeners, &Connection->protseq_entry);
|
||||||
|
Connection->protseq = protseq;
|
||||||
LeaveCriticalSection(&protseq->cs);
|
LeaveCriticalSection(&protseq->cs);
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
|
@ -1323,6 +1325,7 @@ static RPC_STATUS rpcrt4_protseq_ncacn_ip_tcp_open_endpoint(RpcServerProtseq *pr
|
||||||
|
|
||||||
EnterCriticalSection(&protseq->cs);
|
EnterCriticalSection(&protseq->cs);
|
||||||
list_add_tail(&protseq->listeners, &tcpc->common.protseq_entry);
|
list_add_tail(&protseq->listeners, &tcpc->common.protseq_entry);
|
||||||
|
tcpc->common.protseq = protseq;
|
||||||
LeaveCriticalSection(&protseq->cs);
|
LeaveCriticalSection(&protseq->cs);
|
||||||
|
|
||||||
freeaddrinfo(ai);
|
freeaddrinfo(ai);
|
||||||
|
@ -3343,6 +3346,13 @@ RPC_STATUS RPCRT4_ReleaseConnection(RpcConnection* Connection)
|
||||||
/* server-only */
|
/* server-only */
|
||||||
if (Connection->server_binding) RPCRT4_ReleaseBinding(Connection->server_binding);
|
if (Connection->server_binding) RPCRT4_ReleaseBinding(Connection->server_binding);
|
||||||
|
|
||||||
|
if (Connection->protseq)
|
||||||
|
{
|
||||||
|
EnterCriticalSection(&Connection->protseq->cs);
|
||||||
|
list_remove(&Connection->protseq_entry);
|
||||||
|
LeaveCriticalSection(&Connection->protseq->cs);
|
||||||
|
}
|
||||||
|
|
||||||
HeapFree(GetProcessHeap(), 0, Connection);
|
HeapFree(GetProcessHeap(), 0, Connection);
|
||||||
return RPC_S_OK;
|
return RPC_S_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue