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
ef267f11
Commit
ef267f11
authored
May 23, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
May 23, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Store all active connections in RpcServerProtseq.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
dae30652
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
11 deletions
+23
-11
rpc_server.c
dlls/rpcrt4/rpc_server.c
+1
-0
rpc_server.h
dlls/rpcrt4/rpc_server.h
+1
-0
rpc_transport.c
dlls/rpcrt4/rpc_transport.c
+21
-11
No files found.
dlls/rpcrt4/rpc_server.c
View file @
ef267f11
...
...
@@ -946,6 +946,7 @@ static RPC_STATUS alloc_serverprotoseq(UINT MaxCalls, const char *Protseq, RpcSe
(
*
ps
)
->
ops
=
ops
;
(
*
ps
)
->
MaxCalls
=
0
;
list_init
(
&
(
*
ps
)
->
listeners
);
list_init
(
&
(
*
ps
)
->
connections
);
InitializeCriticalSection
(
&
(
*
ps
)
->
cs
);
(
*
ps
)
->
cs
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": RpcServerProtseq.cs"
);
(
*
ps
)
->
is_listening
=
FALSE
;
...
...
dlls/rpcrt4/rpc_server.h
View file @
ef267f11
...
...
@@ -34,6 +34,7 @@ typedef struct _RpcServerProtseq
UINT
MaxCalls
;
/* RO */
/* list of listening connections */
struct
list
listeners
;
/* CS cs */
struct
list
connections
;
/* CS cs */
CRITICAL_SECTION
cs
;
/* is the server currently listening? */
...
...
dlls/rpcrt4/rpc_transport.c
View file @
ef267f11
...
...
@@ -58,7 +58,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
rpc
);
static
R
PC_STATUS
RPCRT4_SpawnConnection
(
RpcConnection
**
Connection
,
RpcConnection
*
OldC
onnection
);
static
R
pcConnection
*
rpcrt4_spawn_connection
(
RpcConnection
*
old_c
onnection
);
/**** ncacn_np support ****/
...
...
@@ -744,7 +744,7 @@ static int rpcrt4_protseq_np_wait_for_new_connection(RpcServerProtseq *protseq,
release_np_event
(
conn
,
conn
->
listen_event
);
conn
->
listen_event
=
NULL
;
if
(
conn
->
io_status
.
Status
==
STATUS_SUCCESS
||
conn
->
io_status
.
Status
==
STATUS_PIPE_CONNECTED
)
RPCRT4_SpawnConnection
(
&
cconn
,
&
conn
->
common
);
cconn
=
rpcrt4_spawn_connection
(
&
conn
->
common
);
else
ERR
(
"listen failed %x
\n
"
,
conn
->
io_status
.
Status
);
break
;
...
...
@@ -1595,7 +1595,7 @@ static int rpcrt4_protseq_sock_wait_for_new_connection(RpcServerProtseq *protseq
{
if
(
b_handle
==
conn
->
sock_event
)
{
RPCRT4_SpawnConnection
(
&
cconn
,
&
conn
->
common
);
cconn
=
rpcrt4_spawn_connection
(
&
conn
->
common
);
break
;
}
}
...
...
@@ -3311,16 +3311,26 @@ RPC_STATUS RPCRT4_CreateConnection(RpcConnection** Connection, BOOL server,
return
RPC_S_OK
;
}
static
R
PC_STATUS
RPCRT4_SpawnConnection
(
RpcConnection
**
Connection
,
RpcConnection
*
OldC
onnection
)
static
R
pcConnection
*
rpcrt4_spawn_connection
(
RpcConnection
*
old_c
onnection
)
{
RPC_STATUS
err
;
RpcConnection
*
connection
;
RPC_STATUS
err
;
err
=
RPCRT4_CreateConnection
(
Connection
,
OldConnection
->
server
,
rpcrt4_conn_get_name
(
OldConnection
),
OldConnection
->
NetworkAddr
,
OldConnection
->
Endpoint
,
NULL
,
OldConnection
->
AuthInfo
,
OldConnection
->
QOS
,
OldConnection
->
CookieAuth
);
if
(
err
==
RPC_S_OK
)
rpcrt4_conn_handoff
(
OldConnection
,
*
Connection
);
return
err
;
err
=
RPCRT4_CreateConnection
(
&
connection
,
old_connection
->
server
,
rpcrt4_conn_get_name
(
old_connection
),
old_connection
->
NetworkAddr
,
old_connection
->
Endpoint
,
NULL
,
old_connection
->
AuthInfo
,
old_connection
->
QOS
,
old_connection
->
CookieAuth
);
if
(
err
!=
RPC_S_OK
)
return
NULL
;
rpcrt4_conn_handoff
(
old_connection
,
connection
);
if
(
old_connection
->
protseq
)
{
EnterCriticalSection
(
&
old_connection
->
protseq
->
cs
);
connection
->
protseq
=
old_connection
->
protseq
;
list_add_tail
(
&
old_connection
->
protseq
->
connections
,
&
connection
->
protseq_entry
);
LeaveCriticalSection
(
&
old_connection
->
protseq
->
cs
);
}
return
connection
;
}
RpcConnection
*
RPCRT4_GrabConnection
(
RpcConnection
*
conn
)
...
...
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