Module: wine Branch: master Commit: 19b01f2fca53f90248fc8e0463395d112a44f88e URL: http://source.winehq.org/git/wine.git/?a=commit;h=19b01f2fca53f90248fc8e0463...
Author: Jacek Caban jacek@codeweavers.com Date: Tue Feb 10 16:30:45 2009 +0100
wininet: Make sure that we have some data buffered before sending INTERNET_STATUS_REQUEST_COMPLETE notification.
---
dlls/wininet/ftp.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/dlls/wininet/ftp.c b/dlls/wininet/ftp.c index 817660a..32607b9 100644 --- a/dlls/wininet/ftp.c +++ b/dlls/wininet/ftp.c @@ -1308,10 +1308,14 @@ HINTERNET FTP_FtpOpenFileW(LPWININETFTPSESSIONW lpwfs, &iar, sizeof(INTERNET_ASYNC_RESULT)); }
- iar.dwResult = bSuccess; - iar.dwError = bSuccess ? ERROR_SUCCESS : INTERNET_GetLastError(); - SendAsyncCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE, - &iar, sizeof(INTERNET_ASYNC_RESULT)); + if(bSuccess) { + FTP_ReceiveRequestData(lpwh, TRUE); + }else { + iar.dwResult = 0; + iar.dwError = INTERNET_GetLastError(); + SendAsyncCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE, + &iar, sizeof(INTERNET_ASYNC_RESULT)); + } }
lend: