wininet: Make sure that we have some data buffered before sending INTERNET_STATUS_REQUEST_COMPLETE notification.

This commit is contained in:
Jacek Caban 2009-02-10 16:30:45 +01:00 committed by Alexandre Julliard
parent f8e6fbffc5
commit 19b01f2fca
1 changed files with 8 additions and 4 deletions

View File

@ -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: