Module: wine Branch: refs/heads/master Commit: 6455b9e1a07c73c0b4c0762147e54649f63c79df URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=6455b9e1a07c73c0b4c07621...
Author: Robert Shearman rob@codeweavers.com Date: Thu Aug 3 20:24:57 2006 +0100
ole32: Fix CoLockObjectExternal to respect fLastUnlockReleases.
---
dlls/ole32/compobj.c | 2 +- dlls/ole32/compobj_private.h | 2 +- dlls/ole32/marshal.c | 2 +- dlls/ole32/stubmanager.c | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 683e24d..c291e81 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -2234,7 +2234,7 @@ HRESULT WINAPI CoLockObjectExternal( if (fLock) stub_manager_ext_addref(stubmgr, 1); else - stub_manager_ext_release(stubmgr, 1); + stub_manager_ext_release(stubmgr, 1, fLastUnlockReleases);
stub_manager_int_release(stubmgr);
diff --git a/dlls/ole32/compobj_private.h b/dlls/ole32/compobj_private.h index a542cc6..4d27bab 100644 --- a/dlls/ole32/compobj_private.h +++ b/dlls/ole32/compobj_private.h @@ -187,7 +187,7 @@ ULONG stub_manager_int_addref(struct stu ULONG stub_manager_int_release(struct stub_manager *This); struct stub_manager *new_stub_manager(APARTMENT *apt, IUnknown *object); ULONG stub_manager_ext_addref(struct stub_manager *m, ULONG refs); -ULONG stub_manager_ext_release(struct stub_manager *m, ULONG refs); +ULONG stub_manager_ext_release(struct stub_manager *m, ULONG refs, BOOL last_unlock_releases); struct ifstub *stub_manager_new_ifstub(struct stub_manager *m, IRpcStubBuffer *sb, IUnknown *iptr, REFIID iid, MSHLFLAGS flags); struct ifstub *stub_manager_find_ifstub(struct stub_manager *m, REFIID iid, MSHLFLAGS flags); struct stub_manager *get_stub_manager(APARTMENT *apt, OID oid); diff --git a/dlls/ole32/marshal.c b/dlls/ole32/marshal.c index 152647b..cbe4a0f 100644 --- a/dlls/ole32/marshal.c +++ b/dlls/ole32/marshal.c @@ -1190,7 +1190,7 @@ StdMarshalImpl_UnmarshalInterface(LPMARS
/* unref the ifstub. FIXME: only do this on success? */ if (!stub_manager_is_table_marshaled(stubmgr, &stdobjref.ipid)) - stub_manager_ext_release(stubmgr, stdobjref.cPublicRefs); + stub_manager_ext_release(stubmgr, stdobjref.cPublicRefs, TRUE);
stub_manager_int_release(stubmgr); return hres; diff --git a/dlls/ole32/stubmanager.c b/dlls/ole32/stubmanager.c index e5f8741..e0b0007 100644 --- a/dlls/ole32/stubmanager.c +++ b/dlls/ole32/stubmanager.c @@ -253,7 +253,7 @@ ULONG stub_manager_ext_addref(struct stu }
/* remove some external references */ -ULONG stub_manager_ext_release(struct stub_manager *m, ULONG refs) +ULONG stub_manager_ext_release(struct stub_manager *m, ULONG refs, BOOL last_unlock_releases) { ULONG rc;
@@ -267,7 +267,7 @@ ULONG stub_manager_ext_release(struct st
TRACE("removed %lu refs from %p (oid %s), rc is now %lu\n", refs, m, wine_dbgstr_longlong(m->oid), rc);
- if (rc == 0) + if (rc == 0 && last_unlock_releases) stub_manager_int_release(m);
return rc; @@ -537,7 +537,7 @@ void stub_manager_release_marshal_data(s else if (ifstub->flags & MSHLFLAGS_TABLESTRONG) refs = 1;
- stub_manager_ext_release(m, refs); + stub_manager_ext_release(m, refs, TRUE); }
/* is an ifstub table marshaled? */ @@ -717,7 +717,7 @@ static HRESULT WINAPI RemUnknown_RemRele break; }
- stub_manager_ext_release(stubmgr, InterfaceRefs[i].cPublicRefs); + stub_manager_ext_release(stubmgr, InterfaceRefs[i].cPublicRefs, TRUE); if (InterfaceRefs[i].cPrivateRefs) FIXME("Releasing %ld refs securely not implemented\n", InterfaceRefs[i].cPrivateRefs);