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
83109e49
Commit
83109e49
authored
Apr 21, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Apr 21, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Abstract RPCRT4_SpawnConnection.
parent
e7e209da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
14 deletions
+23
-14
rpc_binding.h
dlls/rpcrt4/rpc_binding.h
+6
-0
rpc_transport.c
dlls/rpcrt4/rpc_transport.c
+17
-14
No files found.
dlls/rpcrt4/rpc_binding.h
View file @
83109e49
...
...
@@ -44,6 +44,7 @@ struct protseq_ops {
char
*
name
;
RPC_STATUS
(
*
open_connection
)(
RpcConnection
*
conn
);
HANDLE
(
*
get_connect_wait_handle
)(
RpcConnection
*
conn
);
RPC_STATUS
(
*
handoff
)(
RpcConnection
*
old_conn
,
RpcConnection
*
new_conn
);
int
(
*
read
)(
RpcConnection
*
conn
,
void
*
buffer
,
unsigned
int
len
);
int
(
*
write
)(
RpcConnection
*
conn
,
const
void
*
buffer
,
unsigned
int
len
);
int
(
*
close
)(
RpcConnection
*
conn
);
...
...
@@ -121,4 +122,9 @@ static inline HANDLE rpcrt4_conn_get_wait_object(RpcConnection *Connection)
return
Connection
->
ops
->
get_connect_wait_handle
(
Connection
);
}
static
inline
RPC_STATUS
rpcrt4_conn_handoff
(
RpcConnection
*
old_conn
,
RpcConnection
*
new_conn
)
{
return
old_conn
->
ops
->
handoff
(
old_conn
,
new_conn
);
}
#endif
dlls/rpcrt4/rpc_transport.c
View file @
83109e49
...
...
@@ -20,8 +20,6 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* TODO:
* - a whole lot
*/
#include <stdarg.h>
...
...
@@ -161,6 +159,18 @@ static HANDLE rpcrt4_conn_np_get_connect_event(RpcConnection *conn)
return
conn
->
ovl
.
hEvent
;
}
static
RPC_STATUS
rpcrt4_conn_np_handoff
(
RpcConnection
*
old_conn
,
RpcConnection
*
new_conn
)
{
/* because of the way named pipes work, we'll transfer the connected pipe
* to the child, then reopen the server binding to continue listening */
new_conn
->
conn
=
old_conn
->
conn
;
new_conn
->
ovl
=
old_conn
->
ovl
;
old_conn
->
conn
=
0
;
memset
(
&
old_conn
->
ovl
,
0
,
sizeof
(
old_conn
->
ovl
));
return
RPCRT4_OpenConnection
(
old_conn
);
}
static
int
rpcrt4_conn_np_read
(
RpcConnection
*
Connection
,
void
*
buffer
,
unsigned
int
count
)
{
...
...
@@ -198,6 +208,7 @@ struct protseq_ops protseq_list[] = {
{
"ncacn_np"
,
rpcrt4_ncalrpc_open
,
rpcrt4_conn_np_get_connect_event
,
rpcrt4_conn_np_handoff
,
rpcrt4_conn_np_read
,
rpcrt4_conn_np_write
,
rpcrt4_conn_np_close
,
...
...
@@ -205,6 +216,7 @@ struct protseq_ops protseq_list[] = {
{
"ncalrpc"
,
rpcrt4_ncacn_np_open
,
rpcrt4_conn_np_get_connect_event
,
rpcrt4_conn_np_handoff
,
rpcrt4_conn_np_read
,
rpcrt4_conn_np_write
,
rpcrt4_conn_np_close
,
...
...
@@ -261,23 +273,14 @@ RPC_STATUS RPCRT4_CreateConnection(RpcConnection** Connection, BOOL server, LPCS
RPC_STATUS
RPCRT4_SpawnConnection
(
RpcConnection
**
Connection
,
RpcConnection
*
OldConnection
)
{
RpcConnection
*
NewConnection
;
RPC_STATUS
err
;
err
=
RPCRT4_CreateConnection
(
&
New
Connection
,
OldConnection
->
server
,
err
=
RPCRT4_CreateConnection
(
Connection
,
OldConnection
->
server
,
rpcrt4_conn_get_name
(
OldConnection
),
OldConnection
->
NetworkAddr
,
OldConnection
->
Endpoint
,
NULL
,
NULL
);
if
(
err
==
RPC_S_OK
)
{
/* because of the way named pipes work, we'll transfer the connected pipe
* to the child, then reopen the server binding to continue listening */
NewConnection
->
conn
=
OldConnection
->
conn
;
NewConnection
->
ovl
=
OldConnection
->
ovl
;
OldConnection
->
conn
=
0
;
memset
(
&
OldConnection
->
ovl
,
0
,
sizeof
(
OldConnection
->
ovl
));
*
Connection
=
NewConnection
;
RPCRT4_OpenConnection
(
OldConnection
);
}
if
(
err
==
RPC_S_OK
)
rpcrt4_conn_handoff
(
OldConnection
,
*
Connection
);
return
err
;
}
...
...
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