Jacek Caban : rpcrt4: Renamed connections list to listeners.
Alexandre Julliard
julliard at winehq.org
Tue May 23 18:01:27 CDT 2017
Module: wine
Branch: master
Commit: 13d529a749b061a81209589e1d6a4ab077b0f8d0
URL: http://source.winehq.org/git/wine.git/?a=commit;h=13d529a749b061a81209589e1d6a4ab077b0f8d0
Author: Jacek Caban <jacek at codeweavers.com>
Date: Tue May 23 17:39:14 2017 +0200
rpcrt4: Renamed connections list to listeners.
To preserve the name for actual connections.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/rpcrt4/rpc_server.c | 10 +++++-----
dlls/rpcrt4/rpc_server.h | 2 +-
dlls/rpcrt4/rpc_transport.c | 20 +++++++++++---------
3 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/dlls/rpcrt4/rpc_server.c b/dlls/rpcrt4/rpc_server.c
index 8c3aa0f..1327171 100644
--- a/dlls/rpcrt4/rpc_server.c
+++ b/dlls/rpcrt4/rpc_server.c
@@ -670,7 +670,7 @@ static DWORD CALLBACK RPCRT4_server_thread(LPVOID the_arg)
/* cleanup */
cps->ops->free_wait_array(cps, objs);
EnterCriticalSection(&cps->cs);
- LIST_FOR_EACH_ENTRY(conn, &cps->connections, RpcConnection, protseq_entry)
+ LIST_FOR_EACH_ENTRY(conn, &cps->listeners, RpcConnection, protseq_entry)
RPCRT4_CloseConnection(conn);
LeaveCriticalSection(&cps->cs);
@@ -804,7 +804,7 @@ static BOOL RPCRT4_protseq_is_endpoint_registered(RpcServerProtseq *protseq, con
RpcConnection *conn;
BOOL registered = FALSE;
EnterCriticalSection(&protseq->cs);
- LIST_FOR_EACH_ENTRY(conn, &protseq->connections, RpcConnection, protseq_entry) {
+ LIST_FOR_EACH_ENTRY(conn, &protseq->listeners, RpcConnection, protseq_entry) {
if (!endpoint || !strcmp(endpoint, conn->Endpoint)) {
registered = TRUE;
break;
@@ -860,7 +860,7 @@ RPC_STATUS WINAPI RpcServerInqBindings( RPC_BINDING_VECTOR** BindingVector )
count = 0;
LIST_FOR_EACH_ENTRY(ps, &protseqs, RpcServerProtseq, entry) {
EnterCriticalSection(&ps->cs);
- LIST_FOR_EACH_ENTRY(conn, &ps->connections, RpcConnection, protseq_entry)
+ LIST_FOR_EACH_ENTRY(conn, &ps->listeners, RpcConnection, protseq_entry)
count++;
LeaveCriticalSection(&ps->cs);
}
@@ -873,7 +873,7 @@ RPC_STATUS WINAPI RpcServerInqBindings( RPC_BINDING_VECTOR** BindingVector )
count = 0;
LIST_FOR_EACH_ENTRY(ps, &protseqs, RpcServerProtseq, entry) {
EnterCriticalSection(&ps->cs);
- LIST_FOR_EACH_ENTRY(conn, &ps->connections, RpcConnection, protseq_entry) {
+ LIST_FOR_EACH_ENTRY(conn, &ps->listeners, RpcConnection, protseq_entry) {
RPCRT4_MakeBinding((RpcBinding**)&(*BindingVector)->BindingH[count],
conn);
count++;
@@ -945,7 +945,7 @@ static RPC_STATUS alloc_serverprotoseq(UINT MaxCalls, const char *Protseq, RpcSe
(*ps)->Protseq = RPCRT4_strdupA(Protseq);
(*ps)->ops = ops;
(*ps)->MaxCalls = 0;
- list_init(&(*ps)->connections);
+ list_init(&(*ps)->listeners);
InitializeCriticalSection(&(*ps)->cs);
(*ps)->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": RpcServerProtseq.cs");
(*ps)->is_listening = FALSE;
diff --git a/dlls/rpcrt4/rpc_server.h b/dlls/rpcrt4/rpc_server.h
index 3068f0a..a3c476e 100644
--- a/dlls/rpcrt4/rpc_server.h
+++ b/dlls/rpcrt4/rpc_server.h
@@ -33,7 +33,7 @@ typedef struct _RpcServerProtseq
LPSTR Protseq; /* RO */
UINT MaxCalls; /* RO */
/* list of listening connections */
- struct list connections; /* CS cs */
+ struct list listeners; /* CS cs */
CRITICAL_SECTION cs;
/* is the server currently listening? */
diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c
index 37a0f6f..4a3e0c7 100644
--- a/dlls/rpcrt4/rpc_transport.c
+++ b/dlls/rpcrt4/rpc_transport.c
@@ -226,7 +226,7 @@ static RPC_STATUS rpcrt4_protseq_ncalrpc_open_endpoint(RpcServerProtseq* protseq
I_RpcFree(pname);
EnterCriticalSection(&protseq->cs);
- list_add_head(&protseq->connections, &Connection->protseq_entry);
+ list_add_head(&protseq->listeners, &Connection->protseq_entry);
LeaveCriticalSection(&protseq->cs);
return r;
@@ -287,7 +287,7 @@ static RPC_STATUS rpcrt4_protseq_ncacn_np_open_endpoint(RpcServerProtseq *protse
I_RpcFree(pname);
EnterCriticalSection(&protseq->cs);
- list_add_head(&protseq->connections, &Connection->protseq_entry);
+ list_add_head(&protseq->listeners, &Connection->protseq_entry);
LeaveCriticalSection(&protseq->cs);
return r;
@@ -644,7 +644,8 @@ static void *rpcrt4_protseq_np_get_wait_array(RpcServerProtseq *protseq, void *p
/* open and count connections */
*count = 1;
- LIST_FOR_EACH_ENTRY(conn, &protseq->connections, RpcConnection_np, common.protseq_entry) {
+ LIST_FOR_EACH_ENTRY(conn, &protseq->listeners, RpcConnection_np, common.protseq_entry)
+ {
if (!conn->listen_event)
{
NTSTATUS status;
@@ -688,7 +689,8 @@ static void *rpcrt4_protseq_np_get_wait_array(RpcServerProtseq *protseq, void *p
objs[0] = npps->mgr_event;
*count = 1;
- LIST_FOR_EACH_ENTRY(conn, &protseq->connections, RpcConnection_np, common.protseq_entry) {
+ LIST_FOR_EACH_ENTRY(conn, &protseq->listeners, RpcConnection_np, common.protseq_entry)
+ {
if (conn->listen_event)
objs[(*count)++] = conn->listen_event;
}
@@ -733,7 +735,7 @@ static int rpcrt4_protseq_np_wait_for_new_connection(RpcServerProtseq *protseq,
b_handle = objs[res - WAIT_OBJECT_0];
/* find which connection got a RPC */
EnterCriticalSection(&protseq->cs);
- LIST_FOR_EACH_ENTRY(conn, &protseq->connections, RpcConnection_np, common.protseq_entry)
+ LIST_FOR_EACH_ENTRY(conn, &protseq->listeners, RpcConnection_np, common.protseq_entry)
{
if (b_handle == conn->listen_event)
{
@@ -1320,7 +1322,7 @@ static RPC_STATUS rpcrt4_protseq_ncacn_ip_tcp_open_endpoint(RpcServerProtseq *pr
}
EnterCriticalSection(&protseq->cs);
- list_add_tail(&protseq->connections, &tcpc->common.protseq_entry);
+ list_add_tail(&protseq->listeners, &tcpc->common.protseq_entry);
LeaveCriticalSection(&protseq->cs);
freeaddrinfo(ai);
@@ -1511,7 +1513,7 @@ static void *rpcrt4_protseq_sock_get_wait_array(RpcServerProtseq *protseq, void
/* open and count connections */
*count = 1;
- LIST_FOR_EACH_ENTRY(conn, &protseq->connections, RpcConnection_tcp, common.protseq_entry)
+ LIST_FOR_EACH_ENTRY(conn, &protseq->listeners, RpcConnection_tcp, common.protseq_entry)
{
if (conn->sock != -1)
(*count)++;
@@ -1531,7 +1533,7 @@ static void *rpcrt4_protseq_sock_get_wait_array(RpcServerProtseq *protseq, void
objs[0] = sockps->mgr_event;
*count = 1;
- LIST_FOR_EACH_ENTRY(conn, &protseq->connections, RpcConnection_tcp, common.protseq_entry)
+ LIST_FOR_EACH_ENTRY(conn, &protseq->listeners, RpcConnection_tcp, common.protseq_entry)
{
if (conn->sock != -1)
{
@@ -1586,7 +1588,7 @@ static int rpcrt4_protseq_sock_wait_for_new_connection(RpcServerProtseq *protseq
/* find which connection got a RPC */
EnterCriticalSection(&protseq->cs);
- LIST_FOR_EACH_ENTRY(conn, &protseq->connections, RpcConnection_tcp, common.protseq_entry)
+ LIST_FOR_EACH_ENTRY(conn, &protseq->listeners, RpcConnection_tcp, common.protseq_entry)
{
if (b_handle == conn->sock_event)
{
More information about the wine-cvs
mailing list