Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
5d2547ce
Commit
5d2547ce
authored
Dec 10, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Dec 14, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Pass a common header to RPCRT4_BuildCommonHeader.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
parent
33d6900b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
rpc_message.c
dlls/rpcrt4/rpc_message.c
+20
-20
No files found.
dlls/rpcrt4/rpc_message.c
View file @
5d2547ce
...
...
@@ -106,21 +106,21 @@ static BOOL packet_does_auth_negotiation(const RpcPktHdr *Header)
}
}
static
VOID
RPCRT4_BuildCommonHeader
(
RpcPktHdr
*
Header
,
unsigned
char
PacketType
,
static
VOID
RPCRT4_BuildCommonHeader
(
RpcPkt
Common
Hdr
*
Header
,
unsigned
char
PacketType
,
ULONG
DataRepresentation
)
{
Header
->
common
.
rpc_ver
=
RPC_VER_MAJOR
;
Header
->
common
.
rpc_ver_minor
=
RPC_VER_MINOR
;
Header
->
common
.
ptype
=
PacketType
;
Header
->
common
.
drep
[
0
]
=
LOBYTE
(
LOWORD
(
DataRepresentation
));
Header
->
common
.
drep
[
1
]
=
HIBYTE
(
LOWORD
(
DataRepresentation
));
Header
->
common
.
drep
[
2
]
=
LOBYTE
(
HIWORD
(
DataRepresentation
));
Header
->
common
.
drep
[
3
]
=
HIBYTE
(
HIWORD
(
DataRepresentation
));
Header
->
common
.
auth_len
=
0
;
Header
->
c
ommon
.
c
all_id
=
1
;
Header
->
common
.
flags
=
0
;
Header
->
rpc_ver
=
RPC_VER_MAJOR
;
Header
->
rpc_ver_minor
=
RPC_VER_MINOR
;
Header
->
ptype
=
PacketType
;
Header
->
drep
[
0
]
=
LOBYTE
(
LOWORD
(
DataRepresentation
));
Header
->
drep
[
1
]
=
HIBYTE
(
LOWORD
(
DataRepresentation
));
Header
->
drep
[
2
]
=
LOBYTE
(
HIWORD
(
DataRepresentation
));
Header
->
drep
[
3
]
=
HIBYTE
(
HIWORD
(
DataRepresentation
));
Header
->
auth_len
=
0
;
Header
->
call_id
=
1
;
Header
->
flags
=
0
;
/* Flags and fragment length are computed in RPCRT4_Send. */
}
}
static
RpcPktHdr
*
RPCRT4_BuildRequestHeader
(
ULONG
DataRepresentation
,
ULONG
BufferLength
,
...
...
@@ -137,7 +137,7 @@ static RpcPktHdr *RPCRT4_BuildRequestHeader(ULONG DataRepresentation,
return
NULL
;
}
RPCRT4_BuildCommonHeader
(
header
,
PKT_REQUEST
,
DataRepresentation
);
RPCRT4_BuildCommonHeader
(
&
header
->
common
,
PKT_REQUEST
,
DataRepresentation
);
header
->
common
.
frag_len
=
sizeof
(
header
->
request
);
header
->
request
.
alloc_hint
=
BufferLength
;
header
->
request
.
context_id
=
0
;
...
...
@@ -160,7 +160,7 @@ RpcPktHdr *RPCRT4_BuildResponseHeader(ULONG DataRepresentation, ULONG BufferLeng
return
NULL
;
}
RPCRT4_BuildCommonHeader
(
header
,
PKT_RESPONSE
,
DataRepresentation
);
RPCRT4_BuildCommonHeader
(
&
header
->
common
,
PKT_RESPONSE
,
DataRepresentation
);
header
->
common
.
frag_len
=
sizeof
(
header
->
response
);
header
->
response
.
alloc_hint
=
BufferLength
;
...
...
@@ -176,7 +176,7 @@ RpcPktHdr *RPCRT4_BuildFaultHeader(ULONG DataRepresentation, RPC_STATUS Status)
return
NULL
;
}
RPCRT4_BuildCommonHeader
(
header
,
PKT_FAULT
,
DataRepresentation
);
RPCRT4_BuildCommonHeader
(
&
header
->
common
,
PKT_FAULT
,
DataRepresentation
);
header
->
common
.
frag_len
=
sizeof
(
header
->
fault
);
header
->
fault
.
status
=
Status
;
...
...
@@ -199,7 +199,7 @@ RpcPktHdr *RPCRT4_BuildBindHeader(ULONG DataRepresentation,
}
ctxt_elem
=
(
RpcContextElement
*
)(
&
header
->
bind
+
1
);
RPCRT4_BuildCommonHeader
(
header
,
PKT_BIND
,
DataRepresentation
);
RPCRT4_BuildCommonHeader
(
&
header
->
common
,
PKT_BIND
,
DataRepresentation
);
header
->
common
.
frag_len
=
sizeof
(
header
->
bind
)
+
FIELD_OFFSET
(
RpcContextElement
,
transfer_syntaxes
[
1
]);
header
->
bind
.
max_tsize
=
MaxTransmissionSize
;
header
->
bind
.
max_rsize
=
MaxReceiveSize
;
...
...
@@ -220,7 +220,7 @@ static RpcPktHdr *RPCRT4_BuildAuthHeader(ULONG DataRepresentation)
if
(
header
==
NULL
)
return
NULL
;
RPCRT4_BuildCommonHeader
(
header
,
PKT_AUTH3
,
DataRepresentation
);
RPCRT4_BuildCommonHeader
(
&
header
->
common
,
PKT_AUTH3
,
DataRepresentation
);
header
->
common
.
frag_len
=
sizeof
(
header
->
auth3
);
return
header
;
...
...
@@ -238,7 +238,7 @@ RpcPktHdr *RPCRT4_BuildBindNackHeader(ULONG DataRepresentation,
return
NULL
;
}
RPCRT4_BuildCommonHeader
(
header
,
PKT_BIND_NACK
,
DataRepresentation
);
RPCRT4_BuildCommonHeader
(
&
header
->
common
,
PKT_BIND_NACK
,
DataRepresentation
);
header
->
common
.
frag_len
=
FIELD_OFFSET
(
RpcPktHdr
,
bind_nack
.
protocols
[
1
]);
header
->
bind_nack
.
reject_reason
=
RejectReason
;
header
->
bind_nack
.
protocols_count
=
1
;
...
...
@@ -270,7 +270,7 @@ RpcPktHdr *RPCRT4_BuildBindAckHeader(ULONG DataRepresentation,
return
NULL
;
}
RPCRT4_BuildCommonHeader
(
header
,
PKT_BIND_ACK
,
DataRepresentation
);
RPCRT4_BuildCommonHeader
(
&
header
->
common
,
PKT_BIND_ACK
,
DataRepresentation
);
header
->
common
.
frag_len
=
header_size
;
header
->
bind_ack
.
max_tsize
=
MaxTransmissionSize
;
header
->
bind_ack
.
max_rsize
=
MaxReceiveSize
;
...
...
@@ -299,7 +299,7 @@ RpcPktHdr *RPCRT4_BuildHttpHeader(ULONG DataRepresentation,
return
NULL
;
}
RPCRT4_BuildCommonHeader
(
header
,
PKT_HTTP
,
DataRepresentation
);
RPCRT4_BuildCommonHeader
(
&
header
->
common
,
PKT_HTTP
,
DataRepresentation
);
/* since the packet isn't current sent using RPCRT4_Send, set the flags
* manually here */
header
->
common
.
flags
=
RPC_FLG_FIRST
|
RPC_FLG_LAST
;
...
...
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