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
1cb7df8a
Commit
1cb7df8a
authored
Dec 18, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Dec 18, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Implement I_RpcGetCurrentCallHandle.
parent
1421c1a4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
8 deletions
+37
-8
rpc_binding.h
dlls/rpcrt4/rpc_binding.h
+2
-0
rpc_server.c
dlls/rpcrt4/rpc_server.c
+4
-2
rpcrt4_main.c
dlls/rpcrt4/rpcrt4_main.c
+31
-6
No files found.
dlls/rpcrt4/rpc_binding.h
View file @
1cb7df8a
...
@@ -187,5 +187,7 @@ RPC_STATUS RpcTransport_GetTopOfTower(unsigned char *tower_data, size_t *tower_s
...
@@ -187,5 +187,7 @@ RPC_STATUS RpcTransport_GetTopOfTower(unsigned char *tower_data, size_t *tower_s
RPC_STATUS
RpcTransport_ParseTopOfTower
(
const
unsigned
char
*
tower_data
,
size_t
tower_size
,
char
**
protseq
,
char
**
networkaddr
,
char
**
endpoint
);
RPC_STATUS
RpcTransport_ParseTopOfTower
(
const
unsigned
char
*
tower_data
,
size_t
tower_size
,
char
**
protseq
,
char
**
networkaddr
,
char
**
endpoint
);
void
RPCRT4_SetThreadCurrentConnection
(
RpcConnection
*
Connection
);
void
RPCRT4_SetThreadCurrentConnection
(
RpcConnection
*
Connection
);
void
RPCRT4_SetThreadCurrentCallHandle
(
RpcBinding
*
Binding
);
RpcBinding
*
RPCRT4_GetThreadCurrentCallHandle
(
void
);
#endif
#endif
dlls/rpcrt4/rpc_server.c
View file @
1cb7df8a
...
@@ -293,6 +293,7 @@ static void RPCRT4_process_packet(RpcConnection* conn, RpcPktHdr* hdr, RPC_MESSA
...
@@ -293,6 +293,7 @@ static void RPCRT4_process_packet(RpcConnection* conn, RpcPktHdr* hdr, RPC_MESSA
exception
=
FALSE
;
exception
=
FALSE
;
/* dispatch */
/* dispatch */
RPCRT4_SetThreadCurrentCallHandle
(
msg
->
Handle
);
__TRY
{
__TRY
{
if
(
func
)
func
(
msg
);
if
(
func
)
func
(
msg
);
}
__EXCEPT
(
rpc_filter
)
{
}
__EXCEPT
(
rpc_filter
)
{
...
@@ -304,6 +305,7 @@ static void RPCRT4_process_packet(RpcConnection* conn, RpcPktHdr* hdr, RPC_MESSA
...
@@ -304,6 +305,7 @@ static void RPCRT4_process_packet(RpcConnection* conn, RpcPktHdr* hdr, RPC_MESSA
response
=
RPCRT4_BuildFaultHeader
(
msg
->
DataRepresentation
,
response
=
RPCRT4_BuildFaultHeader
(
msg
->
DataRepresentation
,
RPC2NCA_STATUS
(
status
));
RPC2NCA_STATUS
(
status
));
}
__ENDTRY
}
__ENDTRY
RPCRT4_SetThreadCurrentCallHandle
(
NULL
);
if
(
!
exception
)
if
(
!
exception
)
response
=
RPCRT4_BuildResponseHeader
(
msg
->
DataRepresentation
,
response
=
RPCRT4_BuildResponseHeader
(
msg
->
DataRepresentation
,
...
@@ -1127,6 +1129,6 @@ RPC_STATUS WINAPI RpcMgmtSetServerStackSize(ULONG ThreadStackSize)
...
@@ -1127,6 +1129,6 @@ RPC_STATUS WINAPI RpcMgmtSetServerStackSize(ULONG ThreadStackSize)
*/
*/
RPC_BINDING_HANDLE
WINAPI
I_RpcGetCurrentCallHandle
(
void
)
RPC_BINDING_HANDLE
WINAPI
I_RpcGetCurrentCallHandle
(
void
)
{
{
FIXM
E
(
"
\n
"
);
TRAC
E
(
"
\n
"
);
return
NULL
;
return
RPCRT4_GetThreadCurrentCallHandle
()
;
}
}
dlls/rpcrt4/rpcrt4_main.c
View file @
1cb7df8a
...
@@ -152,6 +152,7 @@ struct threaddata
...
@@ -152,6 +152,7 @@ struct threaddata
CRITICAL_SECTION
cs
;
CRITICAL_SECTION
cs
;
DWORD
thread_id
;
DWORD
thread_id
;
RpcConnection
*
connection
;
RpcConnection
*
connection
;
RpcBinding
*
server_binding
;
};
};
/***********************************************************************
/***********************************************************************
...
@@ -188,7 +189,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
...
@@ -188,7 +189,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
DeleteCriticalSection
(
&
tdata
->
cs
);
DeleteCriticalSection
(
&
tdata
->
cs
);
if
(
tdata
->
connection
)
if
(
tdata
->
connection
)
ERR
(
"tdata->connection should be NULL but is still set to %p
\n
"
,
tdata
);
ERR
(
"tdata->connection should be NULL but is still set to %p
\n
"
,
tdata
->
connection
);
if
(
tdata
->
server_binding
)
ERR
(
"tdata->server_binding should be NULL but is still set to %p
\n
"
,
tdata
->
server_binding
);
HeapFree
(
GetProcessHeap
(),
0
,
tdata
);
HeapFree
(
GetProcessHeap
(),
0
,
tdata
);
}
}
break
;
break
;
...
@@ -886,31 +889,53 @@ RPC_STATUS RPC_ENTRY RpcMgmtSetCancelTimeout(LONG Timeout)
...
@@ -886,31 +889,53 @@ RPC_STATUS RPC_ENTRY RpcMgmtSetCancelTimeout(LONG Timeout)
return
RPC_S_OK
;
return
RPC_S_OK
;
}
}
void
RPCRT4_SetThreadCurrentConnection
(
RpcConnection
*
Connection
)
static
struct
threaddata
*
get_or_create_threaddata
(
void
)
{
{
struct
threaddata
*
tdata
=
NtCurrentTeb
()
->
ReservedForNtRpc
;
struct
threaddata
*
tdata
=
NtCurrentTeb
()
->
ReservedForNtRpc
;
if
(
!
tdata
)
if
(
!
tdata
)
{
{
tdata
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
tdata
));
tdata
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
tdata
));
if
(
!
tdata
)
return
;
if
(
!
tdata
)
return
NULL
;
InitializeCriticalSection
(
&
tdata
->
cs
);
InitializeCriticalSection
(
&
tdata
->
cs
);
tdata
->
thread_id
=
GetCurrentThreadId
();
tdata
->
thread_id
=
GetCurrentThreadId
();
tdata
->
connection
=
Connection
;
EnterCriticalSection
(
&
threaddata_cs
);
EnterCriticalSection
(
&
threaddata_cs
);
list_add_tail
(
&
threaddata_list
,
&
tdata
->
entry
);
list_add_tail
(
&
threaddata_list
,
&
tdata
->
entry
);
LeaveCriticalSection
(
&
threaddata_cs
);
LeaveCriticalSection
(
&
threaddata_cs
);
NtCurrentTeb
()
->
ReservedForNtRpc
=
tdata
;
NtCurrentTeb
()
->
ReservedForNtRpc
=
tdata
;
return
;
return
tdata
;
}
}
return
tdata
;
}
void
RPCRT4_SetThreadCurrentConnection
(
RpcConnection
*
Connection
)
{
struct
threaddata
*
tdata
=
get_or_create_threaddata
();
if
(
!
tdata
)
return
;
EnterCriticalSection
(
&
tdata
->
cs
);
EnterCriticalSection
(
&
tdata
->
cs
);
tdata
->
connection
=
Connection
;
tdata
->
connection
=
Connection
;
LeaveCriticalSection
(
&
tdata
->
cs
);
LeaveCriticalSection
(
&
tdata
->
cs
);
}
}
void
RPCRT4_SetThreadCurrentCallHandle
(
RpcBinding
*
Binding
)
{
struct
threaddata
*
tdata
=
get_or_create_threaddata
();
if
(
!
tdata
)
return
;
tdata
->
server_binding
=
Binding
;
}
RpcBinding
*
RPCRT4_GetThreadCurrentCallHandle
(
void
)
{
struct
threaddata
*
tdata
=
get_or_create_threaddata
();
if
(
!
tdata
)
return
NULL
;
return
tdata
->
server_binding
;
}
/******************************************************************************
/******************************************************************************
* RpcCancelThread (rpcrt4.@)
* RpcCancelThread (rpcrt4.@)
*/
*/
...
...
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