Commit 19b01f2f authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wininet: Make sure that we have some data buffered before sending…

wininet: Make sure that we have some data buffered before sending INTERNET_STATUS_REQUEST_COMPLETE notification.
parent f8e6fbff
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment