Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
ebff6036
Commit
ebff6036
authored
Jun 08, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 08, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Access request object directly in WININET_SetAuthorization.
parent
4f51146a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
24 deletions
+7
-24
dialogs.c
dlls/wininet/dialogs.c
+7
-24
No files found.
dlls/wininet/dialogs.c
View file @
ebff6036
...
...
@@ -175,34 +175,21 @@ static BOOL WININET_GetSetPassword( HWND hdlg, LPCWSTR szServer,
/***********************************************************************
* WININET_SetAuthorization
*/
static
BOOL
WININET_SetAuthorization
(
HINTERNET
hR
equest
,
LPWSTR
username
,
static
BOOL
WININET_SetAuthorization
(
http_request_t
*
r
equest
,
LPWSTR
username
,
LPWSTR
password
,
BOOL
proxy
)
{
http_request_t
*
request
;
http_session_t
*
session
;
BOOL
ret
=
FALSE
;
http_session_t
*
session
=
request
->
session
;
LPWSTR
p
,
q
;
request
=
(
http_request_t
*
)
get_handle_object
(
hRequest
);
if
(
!
request
)
return
FALSE
;
session
=
request
->
session
;
if
(
NULL
==
session
||
session
->
hdr
.
htype
!=
WH_HHTTPSESSION
)
{
INTERNET_SetLastError
(
ERROR_INTERNET_INCORRECT_HANDLE_TYPE
);
goto
done
;
}
p
=
heap_strdupW
(
username
);
if
(
!
p
)
goto
done
;
return
FALSE
;
q
=
heap_strdupW
(
password
);
if
(
!
q
)
{
heap_free
(
username
);
goto
done
;
return
FALSE
;
}
if
(
proxy
)
...
...
@@ -224,11 +211,7 @@ static BOOL WININET_SetAuthorization( HINTERNET hRequest, LPWSTR username,
session
->
password
=
q
;
}
ret
=
TRUE
;
done:
WININET_Release
(
&
request
->
hdr
);
return
ret
;
return
TRUE
;
}
/***********************************************************************
...
...
@@ -291,7 +274,7 @@ static INT_PTR WINAPI WININET_ProxyPasswordDialog(
WININET_GetAuthRealm
(
params
->
req
->
hdr
.
hInternet
,
szRealm
,
sizeof
szRealm
/
sizeof
(
WCHAR
),
TRUE
)
)
WININET_GetSetPassword
(
hdlg
,
params
->
req
->
session
->
appInfo
->
proxy
,
szRealm
,
TRUE
);
WININET_SetAuthorization
(
params
->
req
->
hdr
.
hInternet
,
username
,
password
,
TRUE
);
WININET_SetAuthorization
(
params
->
req
,
username
,
password
,
TRUE
);
EndDialog
(
hdlg
,
ERROR_INTERNET_FORCE_RETRY
);
return
TRUE
;
...
...
@@ -368,7 +351,7 @@ static INT_PTR WINAPI WININET_PasswordDialog(
{
WININET_GetSetPassword
(
hdlg
,
params
->
req
->
session
->
hostName
,
szRealm
,
TRUE
);
}
WININET_SetAuthorization
(
params
->
req
->
hdr
.
hInternet
,
username
,
password
,
FALSE
);
WININET_SetAuthorization
(
params
->
req
,
username
,
password
,
FALSE
);
EndDialog
(
hdlg
,
ERROR_INTERNET_FORCE_RETRY
);
return
TRUE
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment