wininet: Use handle stored in WININETHANDLEHEADER instead of WININET_FindHandle.

This commit is contained in:
Jacek Caban 2006-10-30 22:13:52 +01:00 committed by Alexandre Julliard
parent 1572dbde2b
commit 7bd385b714
3 changed files with 3 additions and 20 deletions

View File

@ -1924,12 +1924,7 @@ static BOOL FTP_SendCommandA(INT nSocket, FTP_COMMAND ftpCmd, LPCSTR lpszParam,
if (lpfnStatusCB)
{
HINTERNET hHandle = WININET_FindHandle( hdr );
if( hHandle )
{
lpfnStatusCB(hHandle, dwContext, INTERNET_STATUS_SENDING_REQUEST, NULL, 0);
WININET_Release( hdr );
}
lpfnStatusCB(hdr->hInternet, dwContext, INTERNET_STATUS_SENDING_REQUEST, NULL, 0);
}
dwParamLen = lpszParam?strlen(lpszParam)+1:0;
@ -1953,13 +1948,8 @@ static BOOL FTP_SendCommandA(INT nSocket, FTP_COMMAND ftpCmd, LPCSTR lpszParam,
if (lpfnStatusCB)
{
HINTERNET hHandle = WININET_FindHandle( hdr );
if( hHandle )
{
lpfnStatusCB(hHandle, dwContext, INTERNET_STATUS_REQUEST_SENT,
&nBytesSent, sizeof(DWORD));
WININET_Release( hdr );
}
lpfnStatusCB(hdr->hInternet, dwContext, INTERNET_STATUS_REQUEST_SENT,
&nBytesSent, sizeof(DWORD));
}
TRACE("Sent %d bytes\n", nBytesSent);

View File

@ -154,12 +154,6 @@ end:
return info->hInternet = (HINTERNET) (handle+1);
}
HINTERNET WININET_FindHandle( LPWININETHANDLEHEADER info )
{
WININET_AddRef(info);
return info->hInternet;
}
LPWININETHANDLEHEADER WININET_AddRef( LPWININETHANDLEHEADER info )
{
info->dwRefCount++;

View File

@ -416,7 +416,6 @@ LPWININETHANDLEHEADER WININET_GetObject( HINTERNET hinternet );
LPWININETHANDLEHEADER WININET_AddRef( LPWININETHANDLEHEADER info );
BOOL WININET_Release( LPWININETHANDLEHEADER info );
BOOL WININET_FreeHandle( HINTERNET hinternet );
HINTERNET WININET_FindHandle( LPWININETHANDLEHEADER info );
time_t ConvertTimeString(LPCWSTR asctime);