Commit 7bd385b7 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wininet: Use handle stored in WININETHANDLEHEADER instead of WININET_FindHandle.

parent 1572dbde
......@@ -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);
......
......@@ -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++;
......
......@@ -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);
......
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