From ca608933dd477af442cea95acc72919448c2c68d Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Fri, 14 Jan 2005 17:20:13 +0000 Subject: [PATCH] Make proxy shutdown test succeed by releasing the channel on disconnect. --- dlls/ole32/marshal.c | 9 ++++++++- dlls/ole32/tests/marshal.c | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/dlls/ole32/marshal.c b/dlls/ole32/marshal.c index de3d50e183..d073457f31 100644 --- a/dlls/ole32/marshal.c +++ b/dlls/ole32/marshal.c @@ -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); diff --git a/dlls/ole32/tests/marshal.c b/dlls/ole32/tests/marshal.c index 26a9d54edb..72e2a506fa 100644 --- a/dlls/ole32/tests/marshal.c +++ b/dlls/ole32/tests/marshal.c @@ -350,7 +350,7 @@ static void test_marshal_proxy_apartment_shutdown() CoUninitialize(); - todo_wine { ok_no_locks(); } + ok_no_locks(); IUnknown_Release(pProxy); -- 2.32.0.93.g670b81a890