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, ...@@ -1924,12 +1924,7 @@ static BOOL FTP_SendCommandA(INT nSocket, FTP_COMMAND ftpCmd, LPCSTR lpszParam,
if (lpfnStatusCB) if (lpfnStatusCB)
{ {
HINTERNET hHandle = WININET_FindHandle( hdr ); lpfnStatusCB(hdr->hInternet, dwContext, INTERNET_STATUS_SENDING_REQUEST, NULL, 0);
if( hHandle )
{
lpfnStatusCB(hHandle, dwContext, INTERNET_STATUS_SENDING_REQUEST, NULL, 0);
WININET_Release( hdr );
}
} }
dwParamLen = lpszParam?strlen(lpszParam)+1:0; dwParamLen = lpszParam?strlen(lpszParam)+1:0;
...@@ -1953,13 +1948,8 @@ static BOOL FTP_SendCommandA(INT nSocket, FTP_COMMAND ftpCmd, LPCSTR lpszParam, ...@@ -1953,13 +1948,8 @@ static BOOL FTP_SendCommandA(INT nSocket, FTP_COMMAND ftpCmd, LPCSTR lpszParam,
if (lpfnStatusCB) if (lpfnStatusCB)
{ {
HINTERNET hHandle = WININET_FindHandle( hdr ); lpfnStatusCB(hdr->hInternet, dwContext, INTERNET_STATUS_REQUEST_SENT,
if( hHandle ) &nBytesSent, sizeof(DWORD));
{
lpfnStatusCB(hHandle, dwContext, INTERNET_STATUS_REQUEST_SENT,
&nBytesSent, sizeof(DWORD));
WININET_Release( hdr );
}
} }
TRACE("Sent %d bytes\n", nBytesSent); TRACE("Sent %d bytes\n", nBytesSent);
......
...@@ -154,12 +154,6 @@ end: ...@@ -154,12 +154,6 @@ end:
return info->hInternet = (HINTERNET) (handle+1); return info->hInternet = (HINTERNET) (handle+1);
} }
HINTERNET WININET_FindHandle( LPWININETHANDLEHEADER info )
{
WININET_AddRef(info);
return info->hInternet;
}
LPWININETHANDLEHEADER WININET_AddRef( LPWININETHANDLEHEADER info ) LPWININETHANDLEHEADER WININET_AddRef( LPWININETHANDLEHEADER info )
{ {
info->dwRefCount++; info->dwRefCount++;
......
...@@ -416,7 +416,6 @@ LPWININETHANDLEHEADER WININET_GetObject( HINTERNET hinternet ); ...@@ -416,7 +416,6 @@ LPWININETHANDLEHEADER WININET_GetObject( HINTERNET hinternet );
LPWININETHANDLEHEADER WININET_AddRef( LPWININETHANDLEHEADER info ); LPWININETHANDLEHEADER WININET_AddRef( LPWININETHANDLEHEADER info );
BOOL WININET_Release( LPWININETHANDLEHEADER info ); BOOL WININET_Release( LPWININETHANDLEHEADER info );
BOOL WININET_FreeHandle( HINTERNET hinternet ); BOOL WININET_FreeHandle( HINTERNET hinternet );
HINTERNET WININET_FindHandle( LPWININETHANDLEHEADER info );
time_t ConvertTimeString(LPCWSTR asctime); 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