[PATCH 1/2] urlmon: Set BINDING_LOCKED flag before calling LockRequest.

Rémi Bernon rbernon at codeweavers.com
Tue Jan 4 11:10:00 CST 2022


And clear it if the call failed.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46213
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52286
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---

I tried to keep the changes as simple as possible for the code freeze,
but overall the call sequence doesn't look completely right compared to
native, although it may not matter too much.

The patches are fixing a regression with several launchers, and as they
are quite ad-hoc, hopefully they will not have any impact on anything
else...

 dlls/urlmon/binding.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c
index a74970033b3..b7bea04c4d1 100644
--- a/dlls/urlmon/binding.c
+++ b/dlls/urlmon/binding.c
@@ -1126,9 +1126,10 @@ static void report_data(Binding *This, DWORD bscf, ULONG progress, ULONG progres
         HRESULT hres;
 
         if(!(This->state & BINDING_LOCKED)) {
+            This->state |= BINDING_LOCKED;
             hres = IInternetProtocolEx_LockRequest(&This->protocol->IInternetProtocolEx_iface, 0);
-            if(SUCCEEDED(hres))
-                This->state |= BINDING_LOCKED;
+            if(FAILED(hres))
+                This->state &= ~BINDING_LOCKED;
         }
 
         hres = This->stgmed_obj->vtbl->fill_stgmed(This->stgmed_obj, &stgmed);
-- 
2.34.1




More information about the wine-devel mailing list