Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
3b4f3ff3
Commit
3b4f3ff3
authored
Oct 16, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Reset assoc_group_id on associations with no active connection.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c4d85843
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
0 deletions
+14
-0
rpc_assoc.c
dlls/rpcrt4/rpc_assoc.c
+11
-0
rpc_assoc.h
dlls/rpcrt4/rpc_assoc.h
+2
-0
rpc_transport.c
dlls/rpcrt4/rpc_transport.c
+1
-0
No files found.
dlls/rpcrt4/rpc_assoc.c
View file @
3b4f3ff3
...
...
@@ -80,6 +80,7 @@ static RPC_STATUS RpcAssoc_Alloc(LPCSTR Protseq, LPCSTR NetworkAddr,
assoc
->
Endpoint
=
RPCRT4_strdupA
(
Endpoint
);
assoc
->
NetworkOptions
=
NetworkOptions
?
RPCRT4_strdupW
(
NetworkOptions
)
:
NULL
;
assoc
->
assoc_group_id
=
0
;
assoc
->
connection_cnt
=
0
;
UuidCreate
(
&
assoc
->
http_uuid
);
list_init
(
&
assoc
->
entry
);
*
assoc_out
=
assoc
;
...
...
@@ -422,6 +423,7 @@ RPC_STATUS RpcAssoc_GetClientConnection(RpcAssoc *assoc,
return
status
;
}
InterlockedIncrement
(
&
assoc
->
connection_cnt
);
*
Connection
=
NewConnection
;
return
RPC_S_OK
;
...
...
@@ -437,6 +439,15 @@ void RpcAssoc_ReleaseIdleConnection(RpcAssoc *assoc, RpcConnection *Connection)
LeaveCriticalSection
(
&
assoc
->
cs
);
}
void
RpcAssoc_ConnectionReleased
(
RpcAssoc
*
assoc
)
{
if
(
InterlockedDecrement
(
&
assoc
->
connection_cnt
))
return
;
TRACE
(
"Last %p connection released
\n
"
,
assoc
);
assoc
->
assoc_group_id
=
0
;
}
RPC_STATUS
RpcServerAssoc_AllocateContextHandle
(
RpcAssoc
*
assoc
,
void
*
CtxGuard
,
NDR_SCONTEXT
*
SContext
)
{
...
...
dlls/rpcrt4/rpc_assoc.h
View file @
3b4f3ff3
...
...
@@ -41,6 +41,7 @@ typedef struct _RpcAssoc
/* client-only */
/* connections available to be used (protected by cs) */
struct
list
free_connection_pool
;
LONG
connection_cnt
;
/* server-only */
struct
list
context_handle_list
;
/* protected by cs */
...
...
@@ -59,3 +60,4 @@ RPC_STATUS RpcServerAssoc_UpdateContextHandle(RpcAssoc *assoc, NDR_SCONTEXT SCon
unsigned
int
RpcServerAssoc_ReleaseContextHandle
(
RpcAssoc
*
assoc
,
NDR_SCONTEXT
SContext
,
BOOL
release_lock
)
DECLSPEC_HIDDEN
;
void
RpcContextHandle_GetUuid
(
NDR_SCONTEXT
SContext
,
UUID
*
uuid
)
DECLSPEC_HIDDEN
;
BOOL
RpcContextHandle_IsGuardCorrect
(
NDR_SCONTEXT
SContext
,
void
*
CtxGuard
)
DECLSPEC_HIDDEN
;
void
RpcAssoc_ConnectionReleased
(
RpcAssoc
*
assoc
)
DECLSPEC_HIDDEN
;
dlls/rpcrt4/rpc_transport.c
View file @
3b4f3ff3
...
...
@@ -3419,6 +3419,7 @@ void RPCRT4_ReleaseConnection(RpcConnection *connection)
/* server-only */
if
(
connection
->
server_binding
)
RPCRT4_ReleaseBinding
(
connection
->
server_binding
);
else
if
(
connection
->
assoc
)
RpcAssoc_ConnectionReleased
(
connection
->
assoc
);
if
(
connection
->
wait_release
)
SetEvent
(
connection
->
wait_release
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment