mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 15:50:46 +00:00
rpcrt4: RpcServerUnregisterIf() with NULL ifspec shouldn't unregister auto-listen interfaces.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9d6d2eb3ce
commit
950b349885
|
@ -1220,7 +1220,8 @@ RPC_STATUS WINAPI RpcServerUnregisterIf( RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid
|
|||
|
||||
EnterCriticalSection(&server_cs);
|
||||
LIST_FOR_EACH_ENTRY(cif, &server_interfaces, RpcServerInterface, entry) {
|
||||
if ((!IfSpec || !memcmp(&If->InterfaceId, &cif->If->InterfaceId, sizeof(RPC_SYNTAX_IDENTIFIER))) &&
|
||||
if (((!IfSpec && !(cif->Flags & RPC_IF_AUTOLISTEN)) ||
|
||||
(IfSpec && !memcmp(&If->InterfaceId, &cif->If->InterfaceId, sizeof(RPC_SYNTAX_IDENTIFIER)))) &&
|
||||
UuidEqual(MgrTypeUuid, &cif->MgrTypeUuid, &status)) {
|
||||
list_remove(&cif->entry);
|
||||
TRACE("unregistering cif %p\n", cif);
|
||||
|
|
|
@ -844,6 +844,14 @@ void __cdecl s_stop(void)
|
|||
}
|
||||
}
|
||||
|
||||
void __cdecl s_stop_autolisten(void)
|
||||
{
|
||||
RPC_STATUS status;
|
||||
status = RpcServerUnregisterIf(NULL, NULL, FALSE);
|
||||
todo_wine
|
||||
ok(status == RPC_S_UNKNOWN_MGR_TYPE, "got %u\n", status);
|
||||
}
|
||||
|
||||
void __cdecl s_ip_test(ipu_t *a)
|
||||
{
|
||||
STATSTG st;
|
||||
|
@ -1690,6 +1698,9 @@ client(const char *test)
|
|||
todo_wine
|
||||
test_is_server_listening(IServer_IfHandle, RPC_S_NOT_LISTENING);
|
||||
|
||||
stop_autolisten();
|
||||
ok(int_return() == INT_CODE, "RPC int_return\n");
|
||||
|
||||
ok(RPC_S_OK == RpcStringFreeA(&binding), "RpcStringFree\n");
|
||||
ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n");
|
||||
}
|
||||
|
|
|
@ -385,6 +385,7 @@ cpp_quote("#endif")
|
|||
void authinfo_test(unsigned int protseq, int secure);
|
||||
|
||||
void stop(void);
|
||||
void stop_autolisten(void);
|
||||
|
||||
typedef union ipu switch(int t)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue