wininet: Make sure that we have some data buffered before sending INTERNET_STATUS_REQUEST_COMPLETE notification.
This commit is contained in:
parent
f8e6fbffc5
commit
19b01f2fca
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue