Make proxy shutdown test succeed by releasing the channel on

disconnect.
This commit is contained in:
Robert Shearman 2005-01-14 17:20:13 +00:00 committed by Alexandre Julliard
parent 77502e7e62
commit ca608933dd
2 changed files with 9 additions and 2 deletions

View File

@ -355,6 +355,8 @@ static void proxy_manager_disconnect(struct proxy_manager * This)
{
struct list * cursor;
TRACE("oid = %s\n", wine_dbgstr_longlong(This->oid));
EnterCriticalSection(&This->cs);
LIST_FOR_EACH(cursor, &This->interfaces)
@ -366,6 +368,11 @@ static void proxy_manager_disconnect(struct proxy_manager * This)
/* apartment is being destroyed so don't keep a pointer around to it */
This->parent = NULL;
/* FIXME: will this still be necessary if/when we use a real RPC
* channel? */
IRpcChannelBuffer_Release(This->chan);
This->chan = NULL;
LeaveCriticalSection(&This->cs);
}
@ -397,7 +404,7 @@ static void proxy_manager_destroy(struct proxy_manager * This)
ifproxy_destroy(ifproxy);
}
IRpcChannelBuffer_Release(This->chan);
if (This->chan) IRpcChannelBuffer_Release(This->chan);
DeleteCriticalSection(&This->cs);

View File

@ -350,7 +350,7 @@ static void test_marshal_proxy_apartment_shutdown()
CoUninitialize();
todo_wine { ok_no_locks(); }
ok_no_locks();
IUnknown_Release(pProxy);