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
e0c67a18
Commit
e0c67a18
authored
Jan 08, 2008
by
Rob Shearman
Committed by
Alexandre Julliard
Jan 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Implement NdrMapCommAndFaultStatus.
Add tests for this function.
parent
c370980d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
4 deletions
+67
-4
ndr_clientserver.c
dlls/rpcrt4/ndr_clientserver.c
+23
-4
ndr_marshall.c
dlls/rpcrt4/tests/ndr_marshall.c
+44
-0
No files found.
dlls/rpcrt4/ndr_clientserver.c
View file @
e0c67a18
...
...
@@ -216,10 +216,29 @@ RPC_STATUS RPC_ENTRY NdrMapCommAndFaultStatus( PMIDL_STUB_MESSAGE pStubMsg,
ULONG
*
pFaultStatus
,
RPC_STATUS
Status
)
{
FIXME
(
"(%p, %p, %p, %ld): stub
\n
"
,
pStubMsg
,
pCommStatus
,
pFaultStatus
,
Status
);
*
pCommStatus
=
0
;
*
pFaultStatus
=
0
;
TRACE
(
"(%p, %p, %p, %ld)
\n
"
,
pStubMsg
,
pCommStatus
,
pFaultStatus
,
Status
);
switch
(
Status
)
{
case
ERROR_INVALID_HANDLE
:
case
RPC_S_INVALID_BINDING
:
case
RPC_S_UNKNOWN_IF
:
case
RPC_S_SERVER_UNAVAILABLE
:
case
RPC_S_SERVER_TOO_BUSY
:
case
RPC_S_CALL_FAILED_DNE
:
case
RPC_S_PROTOCOL_ERROR
:
case
RPC_S_UNSUPPORTED_TRANS_SYN
:
case
RPC_S_UNSUPPORTED_TYPE
:
case
RPC_S_PROCNUM_OUT_OF_RANGE
:
case
EPT_S_NOT_REGISTERED
:
case
RPC_S_COMM_FAILURE
:
*
pCommStatus
=
Status
;
*
pFaultStatus
=
0
;
break
;
default:
*
pCommStatus
=
0
;
*
pFaultStatus
=
Status
;
}
return
RPC_S_OK
;
}
dlls/rpcrt4/tests/ndr_marshall.c
View file @
e0c67a18
...
...
@@ -1605,6 +1605,49 @@ todo_wine
ok
(
status
==
RPC_S_OK
,
"RpcServerUnregisterIf failed (%lu)
\n
"
,
status
);
}
static
void
test_NdrMapCommAndFaultStatus
(
void
)
{
RPC_STATUS
rpc_status
;
MIDL_STUB_MESSAGE
StubMsg
;
RPC_MESSAGE
RpcMessage
;
NdrClientInitializeNew
(
&
RpcMessage
,
&
StubMsg
,
&
Object_StubDesc
,
5
);
for
(
rpc_status
=
0
;
rpc_status
<
10000
;
rpc_status
++
)
{
RPC_STATUS
status
;
ULONG
comm_status
=
0
;
ULONG
fault_status
=
0
;
ULONG
expected_comm_status
=
0
;
ULONG
expected_fault_status
=
0
;
status
=
NdrMapCommAndFaultStatus
(
&
StubMsg
,
&
comm_status
,
&
fault_status
,
rpc_status
);
ok
(
status
==
RPC_S_OK
,
"NdrMapCommAndFaultStatus failed with error %ld
\n
"
,
status
);
switch
(
rpc_status
)
{
case
ERROR_INVALID_HANDLE
:
case
RPC_S_INVALID_BINDING
:
case
RPC_S_UNKNOWN_IF
:
case
RPC_S_SERVER_UNAVAILABLE
:
case
RPC_S_SERVER_TOO_BUSY
:
case
RPC_S_CALL_FAILED_DNE
:
case
RPC_S_PROTOCOL_ERROR
:
case
RPC_S_UNSUPPORTED_TRANS_SYN
:
case
RPC_S_UNSUPPORTED_TYPE
:
case
RPC_S_PROCNUM_OUT_OF_RANGE
:
case
EPT_S_NOT_REGISTERED
:
case
RPC_S_COMM_FAILURE
:
expected_comm_status
=
rpc_status
;
break
;
default:
expected_fault_status
=
rpc_status
;
}
ok
(
comm_status
==
expected_comm_status
,
"NdrMapCommAndFaultStatus should have mapped %ld to comm status %d instead of %d
\n
"
,
rpc_status
,
expected_comm_status
,
comm_status
);
ok
(
fault_status
==
expected_fault_status
,
"NdrMapCommAndFaultStatus should have mapped %ld to fault status %d instead of %d
\n
"
,
rpc_status
,
expected_fault_status
,
fault_status
);
}
}
START_TEST
(
ndr_marshall
)
{
test_ndr_simple_type
();
...
...
@@ -1618,4 +1661,5 @@ START_TEST( ndr_marshall )
test_conformant_string
();
test_nonconformant_string
();
test_ndr_buffer
();
test_NdrMapCommAndFaultStatus
();
}
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