[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-patches
Subject:    winhttp: Don't try and call a null callback
From:       Paul TBBle Hampson <Paul.Hampson () Pobox ! com>
Date:       2008-12-31 8:08:06
Message-ID: 20081231080806.GA8054 () keitarou ! watson ! bubblesworth ! net
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]


Between this patch and "winhttp: Correctly parse specified ports in
WinHttpCrackUrl", the Warhammer Online patch client (warpatch.bin)
operates successfully using builtin winhttp.
--=20
-----------------------------------------------------------
Paul "TBBle" Hampson, B.Sc, LPI, MCSE
Very-later-year Asian Studies student, ANU
The Boss, Bubblesworth Pty Ltd (ABN: 51 095 284 361)
Paul.Hampson@Pobox.com

Of course Pacman didn't influence us as kids. If it did,
we'd be running around in darkened rooms, popping pills and
listening to repetitive music.
 -- Kristian Wilson, Nintendo, Inc, 1989

License: http://creativecommons.org/licenses/by/2.5/au/
-----------------------------------------------------------

["0001-winhttp-Don-t-try-and-call-a-null-callback.patch" (text/x-diff)]

From a72add2145a5a1ba769c7785703fa74d9720875e Mon Sep 17 00:00:00 2001
From: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
Date: Wed, 31 Dec 2008 18:59:02 +1100
Subject: winhttp: Don't try and call a null callback

---
 dlls/winhttp/session.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c
index db4ce03..11c4b4f 100644
--- a/dlls/winhttp/session.c
+++ b/dlls/winhttp/session.c
@@ -47,7 +47,7 @@ void send_callback( object_header_t *hdr, DWORD status, LPVOID \
info, DWORD bufle  {
     TRACE("%p, 0x%08x, %p, %u\n", hdr, status, info, buflen);
 
-    if (hdr->notify_mask & status) hdr->callback( hdr->handle, hdr->context, status, \
info, buflen ); +    if (hdr->callback && (hdr->notify_mask & status)) hdr->callback( \
hdr->handle, hdr->context, status, info, buflen );  }
 
 /***********************************************************************
-- 
1.5.6.5


[Attachment #8 (application/pgp-signature)]



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic