Jacek Caban : wininet: Access directly host name from request object in dialogs.
Alexandre Julliard
julliard at winehq.org
Fri Jun 8 13:36:13 CDT 2012
Module: wine
Branch: master
Commit: 4f51146a4683c36ed85a1c37deb9eac15e902979
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4f51146a4683c36ed85a1c37deb9eac15e902979
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Jun 8 10:52:12 2012 +0200
wininet: Access directly host name from request object in dialogs.
---
dlls/wininet/dialogs.c | 43 ++++---------------------------------------
1 files changed, 4 insertions(+), 39 deletions(-)
diff --git a/dlls/wininet/dialogs.c b/dlls/wininet/dialogs.c
index 2ec12ae..ebbda7f 100644
--- a/dlls/wininet/dialogs.c
+++ b/dlls/wininet/dialogs.c
@@ -58,34 +58,6 @@ struct WININET_ErrorDlgParams
};
/***********************************************************************
- * WININET_GetServer
- *
- * Determine the name of the web server
- */
-static BOOL WININET_GetServer( HINTERNET hRequest, LPWSTR szBuf, DWORD sz )
-{
- http_request_t *request;
- http_session_t *session = NULL;
- BOOL ret = FALSE;
-
- request = (http_request_t*) get_handle_object( hRequest );
- if (NULL == request)
- return FALSE;
-
- session = request->session;
- if (NULL == session)
- goto done;
-
- lstrcpynW(szBuf, session->hostName, sz);
-
- ret = TRUE;
-
-done:
- WININET_Release( &request->hdr );
- return ret;
-}
-
-/***********************************************************************
* WININET_GetAuthRealm
*
* Determine the name of the (basic) Authentication realm
@@ -360,13 +332,8 @@ static INT_PTR WINAPI WININET_PasswordDialog(
SetWindowTextW( hitem, szRealm );
}
- /* extract the name of the server */
- if( WININET_GetServer( params->req->hdr.hInternet,
- szServer, sizeof szServer/sizeof(WCHAR)) )
- {
- hitem = GetDlgItem( hdlg, IDC_SERVER );
- SetWindowTextW( hitem, szServer );
- }
+ hitem = GetDlgItem( hdlg, IDC_SERVER );
+ SetWindowTextW( hitem, params->req->session->hostName );
WININET_GetSetPassword( hdlg, szServer, szRealm, FALSE );
@@ -397,11 +364,9 @@ static INT_PTR WINAPI WININET_PasswordDialog(
if( hitem &&
SendMessageW( hitem, BM_GETSTATE, 0, 0 ) &&
WININET_GetAuthRealm( params->req->hdr.hInternet,
- szRealm, sizeof szRealm/sizeof(WCHAR), FALSE ) &&
- WININET_GetServer( params->req->hdr.hInternet,
- szServer, sizeof szServer/sizeof(WCHAR)) )
+ szRealm, sizeof szRealm/sizeof(WCHAR), FALSE ))
{
- WININET_GetSetPassword( hdlg, szServer, szRealm, TRUE );
+ WININET_GetSetPassword( hdlg, params->req->session->hostName, szRealm, TRUE );
}
WININET_SetAuthorization( params->req->hdr.hInternet, username, password, FALSE );
More information about the wine-cvs
mailing list