Commit 760043c2 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wininet: Call SendCallback in destructor instead of InternetCloseHandle.

parent ae430f93
......@@ -2689,6 +2689,10 @@ static void FTP_CloseSessionHandle(LPWININETHANDLEHEADER hdr)
TRACE("\n");
INTERNET_SendCallback(hdr, hdr->dwContext,
INTERNET_STATUS_HANDLE_CLOSING, &hdr->hInternet,
sizeof(HINTERNET));
WININET_Release(&lpwfs->lpAppInfo->hdr);
if (lpwfs->download_in_progress != NULL)
......@@ -2779,6 +2783,10 @@ static void FTP_CloseFindNextHandle(LPWININETHANDLEHEADER hdr)
TRACE("\n");
INTERNET_SendCallback(hdr, hdr->dwContext,
INTERNET_STATUS_HANDLE_CLOSING, &hdr->hInternet,
sizeof(HINTERNET));
WININET_Release(&lpwfn->lpFtpSession->hdr);
for (i = 0; i < lpwfn->size; i++)
......@@ -2805,6 +2813,10 @@ static void FTP_CloseFileTransferHandle(LPWININETHANDLEHEADER hdr)
TRACE("\n");
INTERNET_SendCallback(hdr, hdr->dwContext,
INTERNET_STATUS_HANDLE_CLOSING, &hdr->hInternet,
sizeof(HINTERNET));
WININET_Release(&lpwh->lpFtpSession->hdr);
if (!lpwh->session_deleted)
......
......@@ -2939,6 +2939,10 @@ static void HTTP_CloseHTTPRequestHandle(LPWININETHANDLEHEADER hdr)
TRACE("\n");
INTERNET_SendCallback(hdr, hdr->dwContext,
INTERNET_STATUS_HANDLE_CLOSING, &hdr->hInternet,
sizeof(HINTERNET));
WININET_Release(&lpwhr->hdr);
if (NETCON_connected(&lpwhr->netConnection))
......@@ -2973,6 +2977,10 @@ static void HTTP_CloseHTTPSessionHandle(LPWININETHANDLEHEADER hdr)
TRACE("%p\n", lpwhs);
INTERNET_SendCallback(hdr, hdr->dwContext,
INTERNET_STATUS_HANDLE_CLOSING, &hdr->hInternet,
sizeof(HINTERNET));
WININET_Release(&lpwhs->lpAppInfo->hdr);
HeapFree(GetProcessHeap(), 0, lpwhs->lpszHostName);
......
......@@ -975,6 +975,10 @@ static VOID INTERNET_CloseHandle(LPWININETHANDLEHEADER hdr)
TRACE("%p\n",lpwai);
INTERNET_SendCallback(hdr, hdr->dwContext,
INTERNET_STATUS_HANDLE_CLOSING, &hdr->hInternet,
sizeof(HINTERNET));
HeapFree(GetProcessHeap(), 0, lpwai->lpszAgent);
HeapFree(GetProcessHeap(), 0, lpwai->lpszProxy);
HeapFree(GetProcessHeap(), 0, lpwai->lpszProxyBypass);
......@@ -1007,12 +1011,6 @@ BOOL WINAPI InternetCloseHandle(HINTERNET hInternet)
return FALSE;
}
/* FIXME: native appears to send this from the equivalent of
* WININET_Release */
INTERNET_SendCallback(lpwh, lpwh->dwContext,
INTERNET_STATUS_HANDLE_CLOSING, &hInternet,
sizeof(HINTERNET));
WININET_FreeHandle( hInternet );
WININET_Release( lpwh );
......
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