Jacek Caban : rpcrt4: Change RPCRT4_ReleaseConnection return type to void.
Alexandre Julliard
julliard at winehq.org
Thu Jun 8 15:54:57 CDT 2017
Module: wine
Branch: master
Commit: 2cb32b2f3b55fbb3e749da964d828b38cbbdab77
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2cb32b2f3b55fbb3e749da964d828b38cbbdab77
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Jun 8 14:16:56 2017 +0200
rpcrt4: Change RPCRT4_ReleaseConnection return type to void.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/rpcrt4/rpc_binding.c | 7 +++----
dlls/rpcrt4/rpc_binding.h | 2 +-
dlls/rpcrt4/rpc_transport.c | 3 +--
3 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/dlls/rpcrt4/rpc_binding.c b/dlls/rpcrt4/rpc_binding.c
index f2b1d59..ec38b86 100644
--- a/dlls/rpcrt4/rpc_binding.c
+++ b/dlls/rpcrt4/rpc_binding.c
@@ -297,14 +297,13 @@ RPC_STATUS RPCRT4_CloseBinding(RpcBinding* Binding, RpcConnection* Connection)
if (!Connection) return RPC_S_OK;
if (Binding->server) {
/* don't destroy a connection that is cached in the binding */
- if (Binding->FromConn == Connection)
- return RPC_S_OK;
- return RPCRT4_ReleaseConnection(Connection);
+ if (Binding->FromConn != Connection)
+ RPCRT4_ReleaseConnection(Connection);
}
else {
RpcAssoc_ReleaseIdleConnection(Binding->Assoc, Connection);
- return RPC_S_OK;
}
+ return RPC_S_OK;
}
static LPSTR RPCRT4_strconcatA(LPSTR dst, LPCSTR src)
diff --git a/dlls/rpcrt4/rpc_binding.h b/dlls/rpcrt4/rpc_binding.h
index a679b0e..ca53887 100644
--- a/dlls/rpcrt4/rpc_binding.h
+++ b/dlls/rpcrt4/rpc_binding.h
@@ -163,7 +163,7 @@ RPC_STATUS RPCRT4_CreateConnection(RpcConnection** Connection, BOOL server, LPCS
LPCSTR NetworkAddr, LPCSTR Endpoint, LPCWSTR NetworkOptions, RpcAuthInfo* AuthInfo,
RpcQualityOfService *QOS, LPCWSTR CookieAuth) DECLSPEC_HIDDEN;
RpcConnection *RPCRT4_GrabConnection( RpcConnection *conn ) DECLSPEC_HIDDEN;
-RPC_STATUS RPCRT4_ReleaseConnection(RpcConnection* Connection) DECLSPEC_HIDDEN;
+void RPCRT4_ReleaseConnection(RpcConnection* Connection) DECLSPEC_HIDDEN;
RPC_STATUS RPCRT4_OpenClientConnection(RpcConnection* Connection) DECLSPEC_HIDDEN;
RPC_STATUS RPCRT4_CloseConnection(RpcConnection* Connection) DECLSPEC_HIDDEN;
RPC_STATUS RPCRT4_IsServerListening(const char *protseq, const char *endpoint) DECLSPEC_HIDDEN;
diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c
index 909fec1..48def49 100644
--- a/dlls/rpcrt4/rpc_transport.c
+++ b/dlls/rpcrt4/rpc_transport.c
@@ -3380,7 +3380,7 @@ RpcConnection *RPCRT4_GrabConnection(RpcConnection *connection)
return connection;
}
-RPC_STATUS RPCRT4_ReleaseConnection(RpcConnection *connection)
+void RPCRT4_ReleaseConnection(RpcConnection *connection)
{
LONG ref = InterlockedDecrement(&connection->ref);
@@ -3416,7 +3416,6 @@ RPC_STATUS RPCRT4_ReleaseConnection(RpcConnection *connection)
HeapFree(GetProcessHeap(), 0, connection);
}
- return RPC_S_OK;
}
RPC_STATUS RPCRT4_IsServerListening(const char *protseq, const char *endpoint)
More information about the wine-cvs
mailing list