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
0810db96
Commit
0810db96
authored
Mar 03, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 03, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Use RPC_* error code names.
parent
1a200508
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
34 deletions
+34
-34
ndr_contexthandle.c
dlls/rpcrt4/ndr_contexthandle.c
+13
-13
ndr_es.c
dlls/rpcrt4/ndr_es.c
+6
-6
ndr_marshall.c
dlls/rpcrt4/ndr_marshall.c
+3
-3
ndr_stubless.c
dlls/rpcrt4/ndr_stubless.c
+1
-1
rpc_assoc.c
dlls/rpcrt4/rpc_assoc.c
+2
-2
rpc_binding.c
dlls/rpcrt4/rpc_binding.c
+9
-9
No files found.
dlls/rpcrt4/ndr_contexthandle.c
View file @
0810db96
...
...
@@ -91,7 +91,7 @@ RPC_BINDING_HANDLE WINAPI NDRCContextBinding(NDR_CCONTEXT CContext)
if
(
!
handle
)
{
ERR
(
"invalid handle %p
\n
"
,
CContext
);
RpcRaiseException
(
ERROR_INVALID_HANDLE
);
RpcRaiseException
(
RPC_X_SS_CONTEXT_MISMATCH
);
}
return
handle
;
}
...
...
@@ -165,7 +165,7 @@ void WINAPI RpcSsDestroyClientContext(void **ContextHandle)
FIXME
(
"stub
\n
"
);
}
static
UINT
ndr_update_context_handle
(
NDR_CCONTEXT
*
CContext
,
static
RPC_STATUS
ndr_update_context_handle
(
NDR_CCONTEXT
*
CContext
,
RPC_BINDING_HANDLE
hBinding
,
const
ndr_context_handle
*
chi
)
{
...
...
@@ -178,7 +178,7 @@ static UINT ndr_update_context_handle(NDR_CCONTEXT *CContext,
{
che
=
get_context_entry
(
*
CContext
);
if
(
!
che
)
return
ERROR_INVALID_HANDLE
;
return
RPC_X_SS_CONTEXT_MISMATCH
;
list_remove
(
&
che
->
entry
);
RpcBindingFree
(
&
che
->
handle
);
HeapFree
(
GetProcessHeap
(),
0
,
che
);
...
...
@@ -190,7 +190,7 @@ static UINT ndr_update_context_handle(NDR_CCONTEXT *CContext,
{
che
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
*
che
);
if
(
!
che
)
return
ERROR_NOT_ENOUGH
_MEMORY
;
return
RPC_X_NO
_MEMORY
;
che
->
magic
=
NDR_CONTEXT_HANDLE_MAGIC
;
RpcBindingCopy
(
hBinding
,
&
che
->
handle
);
list_add_tail
(
&
context_handle_list
,
&
che
->
entry
);
...
...
@@ -199,7 +199,7 @@ static UINT ndr_update_context_handle(NDR_CCONTEXT *CContext,
*
CContext
=
che
;
return
ERROR_SUCCESS
;
return
RPC_S_OK
;
}
/***********************************************************************
...
...
@@ -209,16 +209,16 @@ void WINAPI NDRCContextUnmarshall(NDR_CCONTEXT *CContext,
RPC_BINDING_HANDLE
hBinding
,
void
*
pBuff
,
ULONG
DataRepresentation
)
{
UINT
r
;
RPC_STATUS
status
;
TRACE
(
"*%p=(%p) %p %p %08x
\n
"
,
CContext
,
*
CContext
,
hBinding
,
pBuff
,
DataRepresentation
);
EnterCriticalSection
(
&
ndr_context_cs
);
r
=
ndr_update_context_handle
(
CContext
,
hBinding
,
pBuff
);
status
=
ndr_update_context_handle
(
CContext
,
hBinding
,
pBuff
);
LeaveCriticalSection
(
&
ndr_context_cs
);
if
(
r
)
RpcRaiseException
(
r
);
if
(
status
)
RpcRaiseException
(
status
);
}
/***********************************************************************
...
...
@@ -263,7 +263,7 @@ void WINAPI NDRSContextMarshall2(RPC_BINDING_HANDLE hBinding,
hBinding
,
SContext
,
pBuff
,
userRunDownIn
,
CtxGuard
,
Flags
);
if
(
!
binding
->
server
||
!
binding
->
Assoc
)
RpcRaiseException
(
ERROR_INVALID_HANDLE
);
RpcRaiseException
(
RPC_S_INVALID_BINDING
);
if
(
Flags
&
RPC_CONTEXT_HANDLE_FLAGS
)
FIXME
(
"unimplemented flags: 0x%x
\n
"
,
Flags
&
RPC_CONTEXT_HANDLE_FLAGS
);
...
...
@@ -282,7 +282,7 @@ void WINAPI NDRSContextMarshall2(RPC_BINDING_HANDLE hBinding,
else
{
if
(
!
RpcContextHandle_IsGuardCorrect
(
SContext
,
CtxGuard
))
RpcRaiseException
(
ERROR_INVALID_HANDLE
);
RpcRaiseException
(
RPC_X_SS_CONTEXT_MISMATCH
);
memset
(
ndr
,
0
,
sizeof
(
*
ndr
));
RPCRT4_RemoveThreadContextHandle
(
SContext
);
...
...
@@ -337,7 +337,7 @@ NDR_SCONTEXT WINAPI NDRSContextUnmarshall2(RPC_BINDING_HANDLE hBinding,
hBinding
,
pBuff
,
DataRepresentation
,
CtxGuard
,
Flags
);
if
(
!
binding
->
server
||
!
binding
->
Assoc
)
RpcRaiseException
(
ERROR_INVALID_HANDLE
);
RpcRaiseException
(
RPC_S_INVALID_BINDING
);
if
(
Flags
&
RPC_CONTEXT_HANDLE_FLAGS
)
FIXME
(
"unimplemented flags: 0x%x
\n
"
,
Flags
&
RPC_CONTEXT_HANDLE_FLAGS
);
...
...
@@ -351,7 +351,7 @@ NDR_SCONTEXT WINAPI NDRSContextUnmarshall2(RPC_BINDING_HANDLE hBinding,
if
(
context_ndr
->
attributes
)
{
ERR
(
"non-null attributes 0x%x
\n
"
,
context_ndr
->
attributes
);
status
=
ERROR_INVALID_HANDLE
;
status
=
RPC_X_SS_CONTEXT_MISMATCH
;
}
else
status
=
RpcServerAssoc_FindContextHandle
(
binding
->
Assoc
,
...
...
dlls/rpcrt4/ndr_es.c
View file @
0810db96
...
...
@@ -57,7 +57,7 @@ RPC_STATUS WINAPI MesEncodeIncrementalHandleCreate(
pEsMsg
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
pEsMsg
));
if
(
!
pEsMsg
)
return
ERROR_OUTOF
MEMORY
;
return
RPC_S_OUT_OF_
MEMORY
;
init_MIDL_ES_MESSAGE
(
pEsMsg
);
...
...
@@ -84,7 +84,7 @@ RPC_STATUS WINAPI MesDecodeIncrementalHandleCreate(
pEsMsg
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
pEsMsg
));
if
(
!
pEsMsg
)
return
ERROR_OUTOF
MEMORY
;
return
RPC_S_OUT_OF_
MEMORY
;
init_MIDL_ES_MESSAGE
(
pEsMsg
);
...
...
@@ -144,7 +144,7 @@ RPC_STATUS RPC_ENTRY MesEncodeFixedBufferHandleCreate(
pEsMsg
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
pEsMsg
));
if
(
!
pEsMsg
)
return
ERROR_OUTOF
MEMORY
;
return
RPC_S_OUT_OF_
MEMORY
;
init_MIDL_ES_MESSAGE
(
pEsMsg
);
...
...
@@ -181,7 +181,7 @@ RPC_STATUS RPC_ENTRY MesDecodeBufferHandleCreate(
pEsMsg
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
pEsMsg
));
if
(
!
pEsMsg
)
return
ERROR_OUTOF
MEMORY
;
return
RPC_S_OUT_OF_
MEMORY
;
init_MIDL_ES_MESSAGE
(
pEsMsg
);
...
...
@@ -205,7 +205,7 @@ static void es_data_alloc(MIDL_ES_MESSAGE *pEsMsg, ULONG size)
if
(
tmpsize
<
size
)
{
ERR
(
"not enough bytes allocated - requested %d, got %d
\n
"
,
size
,
tmpsize
);
RpcRaiseException
(
ERROR_OUTOF
MEMORY
);
RpcRaiseException
(
RPC_S_OUT_OF_
MEMORY
);
}
}
else
if
(
pEsMsg
->
HandleStyle
==
MES_FIXED_BUFFER_HANDLE
)
...
...
@@ -226,7 +226,7 @@ static void es_data_read(MIDL_ES_MESSAGE *pEsMsg, ULONG size)
if
(
tmpsize
<
size
)
{
ERR
(
"not enough bytes read - requested %d, got %d
\n
"
,
size
,
tmpsize
);
RpcRaiseException
(
ERROR_OUTOF
MEMORY
);
RpcRaiseException
(
RPC_S_OUT_OF_
MEMORY
);
}
}
else
...
...
dlls/rpcrt4/ndr_marshall.c
View file @
0810db96
...
...
@@ -395,7 +395,7 @@ typedef struct _NDR_MEMORY_LIST
*
* NOTES
* The memory block is always 8-byte aligned.
* If the function is unable to allocate memory an
ERROR_OUTOF
MEMORY
* If the function is unable to allocate memory an
RPC_X_NO_
MEMORY
* exception is raised.
*/
void
*
WINAPI
NdrAllocate
(
MIDL_STUB_MESSAGE
*
pStubMsg
,
SIZE_T
len
)
...
...
@@ -415,7 +415,7 @@ void * WINAPI NdrAllocate(MIDL_STUB_MESSAGE *pStubMsg, SIZE_T len)
}
p
=
pStubMsg
->
pfnAllocate
(
adjusted_len
);
if
(
!
p
)
RpcRaiseException
(
ERROR_OUTOF
MEMORY
);
if
(
!
p
)
RpcRaiseException
(
RPC_X_NO_
MEMORY
);
mem_list
=
(
NDR_MEMORY_LIST
*
)((
char
*
)
p
+
aligned_len
);
mem_list
->
magic
=
MEML_MAGIC
;
...
...
@@ -4614,7 +4614,7 @@ RPC_STATUS RPC_ENTRY NdrGetUserMarshalInfo(ULONG *flags, ULONG level, NDR_USER_M
if
(
umcb
->
pStubMsg
->
Buffer
<
buffer_start
||
umcb
->
pStubMsg
->
Buffer
>
buffer_end
)
return
ERROR_INVALID_USER
_BUFFER
;
return
RPC_X_INVALID
_BUFFER
;
umi
->
u1
.
Level1
.
Buffer
=
umcb
->
pStubMsg
->
Buffer
;
umi
->
u1
.
Level1
.
BufferSize
=
buffer_end
-
umcb
->
pStubMsg
->
Buffer
;
...
...
dlls/rpcrt4/ndr_stubless.c
View file @
0810db96
...
...
@@ -1512,7 +1512,7 @@ LONG_PTR CDECL ndr_async_client_call( PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING
}
async_call_data
=
I_RpcAllocate
(
sizeof
(
*
async_call_data
)
+
sizeof
(
MIDL_STUB_MESSAGE
)
+
sizeof
(
RPC_MESSAGE
));
if
(
!
async_call_data
)
RpcRaiseException
(
ERROR_OUTOF
MEMORY
);
if
(
!
async_call_data
)
RpcRaiseException
(
RPC_X_NO_
MEMORY
);
async_call_data
->
pProcHeader
=
pProcHeader
;
async_call_data
->
pStubMsg
=
pStubMsg
=
(
PMIDL_STUB_MESSAGE
)(
async_call_data
+
1
);
...
...
dlls/rpcrt4/rpc_assoc.c
View file @
0810db96
...
...
@@ -341,7 +341,7 @@ static RPC_STATUS RpcAssoc_BindConnection(const RpcAssoc *assoc, RpcConnection *
break
;
case
REJECT_INVALID_CHECKSUM
:
ERR
(
"invalid checksum
\n
"
);
status
=
ERROR
_ACCESS_DENIED
;
status
=
RPC_S
_ACCESS_DENIED
;
break
;
default:
ERR
(
"rejected bind for reason %d
\n
"
,
response_hdr
->
bind_nack
.
reject_reason
);
...
...
@@ -443,7 +443,7 @@ RPC_STATUS RpcServerAssoc_AllocateContextHandle(RpcAssoc *assoc, void *CtxGuard,
context_handle
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
context_handle
));
if
(
!
context_handle
)
return
ERROR_OUTOF
MEMORY
;
return
RPC_S_OUT_OF_
MEMORY
;
context_handle
->
ctx_guard
=
CtxGuard
;
RtlInitializeResource
(
&
context_handle
->
rw_lock
);
...
...
dlls/rpcrt4/rpc_binding.c
View file @
0810db96
...
...
@@ -1120,7 +1120,7 @@ RPC_STATUS RpcAuthInfo_Create(ULONG AuthnLevel, ULONG AuthnSvc,
{
RpcAuthInfo
*
AuthInfo
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
AuthInfo
));
if
(
!
AuthInfo
)
return
ERROR_OUTOF
MEMORY
;
return
RPC_S_OUT_OF_
MEMORY
;
AuthInfo
->
refs
=
1
;
AuthInfo
->
AuthnLevel
=
AuthnLevel
;
...
...
@@ -1140,7 +1140,7 @@ RPC_STATUS RpcAuthInfo_Create(ULONG AuthnLevel, ULONG AuthnSvc,
if
(
!
AuthInfo
->
nt_identity
)
{
HeapFree
(
GetProcessHeap
(),
0
,
AuthInfo
);
return
ERROR_OUTOF
MEMORY
;
return
RPC_S_OUT_OF_
MEMORY
;
}
AuthInfo
->
nt_identity
->
Flags
=
SEC_WINNT_AUTH_IDENTITY_UNICODE
;
...
...
@@ -1169,7 +1169,7 @@ RPC_STATUS RpcAuthInfo_Create(ULONG AuthnLevel, ULONG AuthnSvc,
HeapFree
(
GetProcessHeap
(),
0
,
AuthInfo
->
nt_identity
->
Password
);
HeapFree
(
GetProcessHeap
(),
0
,
AuthInfo
->
nt_identity
);
HeapFree
(
GetProcessHeap
(),
0
,
AuthInfo
);
return
ERROR_OUTOF
MEMORY
;
return
RPC_S_OUT_OF_
MEMORY
;
}
}
else
...
...
@@ -1493,7 +1493,7 @@ RpcBindingInqAuthInfoExA( RPC_BINDING_HANDLE Binding, RPC_CSTR *ServerPrincName,
{
*
ServerPrincName
=
(
RPC_CSTR
)
RPCRT4_strdupWtoA
(
principal
);
RpcStringFreeW
(
&
principal
);
if
(
!*
ServerPrincName
)
return
ERROR_OUTOF
MEMORY
;
if
(
!*
ServerPrincName
)
return
RPC_S_OUT_OF_
MEMORY
;
}
return
status
;
...
...
@@ -1525,7 +1525,7 @@ RpcBindingInqAuthInfoExW( RPC_BINDING_HANDLE Binding, RPC_WSTR *ServerPrincName,
if
(
bind
->
AuthInfo
->
server_principal_name
)
{
*
ServerPrincName
=
RPCRT4_strdupW
(
bind
->
AuthInfo
->
server_principal_name
);
if
(
!*
ServerPrincName
)
return
ERROR_OUTOF
MEMORY
;
if
(
!*
ServerPrincName
)
return
RPC_S_OUT_OF_
MEMORY
;
}
else
*
ServerPrincName
=
NULL
;
}
...
...
@@ -1606,7 +1606,7 @@ RpcBindingInqAuthClientExA( RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE *
if
(
status
==
RPC_S_OK
&&
ServerPrincName
)
{
*
ServerPrincName
=
(
RPC_CSTR
)
RPCRT4_strdupWtoA
(
principal
);
if
(
!*
ServerPrincName
&&
principal
)
status
=
ERROR_OUTOF
MEMORY
;
if
(
!*
ServerPrincName
&&
principal
)
status
=
RPC_S_OUT_OF_
MEMORY
;
RpcStringFreeW
(
&
principal
);
}
...
...
@@ -1751,7 +1751,7 @@ RpcBindingSetAuthInfoExA( RPC_BINDING_HANDLE Binding, RPC_CSTR ServerPrincName,
else
{
RpcAuthInfo_Release
(
new_auth_info
);
r
=
ERROR_OUTOF
MEMORY
;
r
=
RPC_S_OUT_OF_
MEMORY
;
}
}
else
...
...
@@ -1882,7 +1882,7 @@ RpcBindingSetAuthInfoExW( RPC_BINDING_HANDLE Binding, RPC_WSTR ServerPrincName,
else
{
RpcAuthInfo_Release
(
new_auth_info
);
r
=
ERROR_OUTOF
MEMORY
;
r
=
RPC_S_OUT_OF_
MEMORY
;
}
}
else
...
...
@@ -1936,7 +1936,7 @@ RPC_STATUS WINAPI RpcBindingSetOption(RPC_BINDING_HANDLE BindingHandle, ULONG Op
int
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
cookie
->
Buffer
,
cookie
->
BufferSize
,
NULL
,
0
);
WCHAR
*
str
;
if
(
!
(
str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
len
+
1
)
*
sizeof
(
WCHAR
))))
return
ERROR_OUTOF
MEMORY
;
if
(
!
(
str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
len
+
1
)
*
sizeof
(
WCHAR
))))
return
RPC_S_OUT_OF_
MEMORY
;
MultiByteToWideChar
(
CP_ACP
,
0
,
cookie
->
Buffer
,
cookie
->
BufferSize
,
str
,
len
);
str
[
len
]
=
0
;
HeapFree
(
GetProcessHeap
(),
0
,
binding
->
CookieAuth
);
...
...
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