wininet: Call SendCallback in destructor instead of InternetCloseHandle.

oldstable
Jacek Caban 2006-10-29 18:58:06 +01:00 committed by Alexandre Julliard
parent ae430f9323
commit 760043c245
3 changed files with 24 additions and 6 deletions

View File

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

View File

@ -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);

View File

@ -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 );