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
f20cfdfa
Commit
f20cfdfa
authored
May 15, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
May 16, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Use RPCRT4_Receive rather than accessing the transport directly.
parent
9b3d8a35
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
29 deletions
+10
-29
rpc_binding.c
dlls/rpcrt4/rpc_binding.c
+10
-29
No files found.
dlls/rpcrt4/rpc_binding.c
View file @
f20cfdfa
...
...
@@ -267,9 +267,8 @@ RPC_STATUS RPCRT4_OpenBinding(RpcBinding* Binding, RpcConnection** Connection,
/* we need to send a binding packet if we are client. */
if
(
!
(
*
Connection
)
->
server
)
{
RpcPktHdr
*
hdr
;
LONG
count
;
BYTE
*
response
;
RpcPktHdr
*
response_hdr
;
RPC_MESSAGE
msg
;
TRACE
(
"sending bind request to server
\n
"
);
...
...
@@ -284,35 +283,17 @@ RPC_STATUS RPCRT4_OpenBinding(RpcBinding* Binding, RpcConnection** Connection,
return
status
;
}
response
=
HeapAlloc
(
GetProcessHeap
(),
0
,
RPC_MAX_PACKET_SIZE
);
if
(
response
==
NULL
)
{
WARN
(
"Can't allocate memory for binding response
\n
"
);
RPCRT4_DestroyConnection
(
*
Connection
);
return
E_OUTOFMEMORY
;
}
count
=
rpcrt4_conn_read
(
NewConnection
,
response
,
RPC_MAX_PACKET_SIZE
);
if
(
count
<
sizeof
(
response_hdr
->
common
))
{
WARN
(
"received invalid header
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
response
);
RPCRT4_DestroyConnection
(
*
Connection
);
return
RPC_S_PROTOCOL_ERROR
;
}
response_hdr
=
(
RpcPktHdr
*
)
response
;
if
(
response_hdr
->
common
.
rpc_ver
!=
RPC_VER_MAJOR
||
response_hdr
->
common
.
rpc_ver_minor
!=
RPC_VER_MINOR
||
response_hdr
->
common
.
ptype
!=
PKT_BIND_ACK
)
{
WARN
(
"invalid protocol version or rejection packet
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
response
);
status
=
RPCRT4_Receive
(
NewConnection
,
&
response_hdr
,
&
msg
);
if
(
status
!=
RPC_S_OK
)
{
ERR
(
"receive failed
\n
"
);
RPCRT4_DestroyConnection
(
*
Connection
);
return
RPC_S_PROTOCOL_ERROR
;
return
status
;
}
if
(
response_hdr
->
bind_ack
.
max_tsize
<
RPC_MIN_PACKET_SIZE
)
{
WARN
(
"server doesn't allow large enough packets
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
response
);
if
(
response_hdr
->
common
.
ptype
!=
PKT_BIND_ACK
||
response_hdr
->
bind_ack
.
max_tsize
<
RPC_MIN_PACKET_SIZE
)
{
ERR
(
"failed to bind
\n
"
);
RPCRT4_FreeHeader
(
response_hdr
);
RPCRT4_DestroyConnection
(
*
Connection
);
return
RPC_S_PROTOCOL_ERROR
;
}
...
...
@@ -321,7 +302,7 @@ RPC_STATUS RPCRT4_OpenBinding(RpcBinding* Binding, RpcConnection** Connection,
(
*
Connection
)
->
MaxTransmissionSize
=
response_hdr
->
bind_ack
.
max_tsize
;
(
*
Connection
)
->
ActiveInterface
=
*
InterfaceId
;
HeapFree
(
GetProcessHeap
(),
0
,
response
);
RPCRT4_FreeHeader
(
response_hdr
);
}
Binding
->
FromConn
=
*
Connection
;
...
...
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