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
dad2439d
Commit
dad2439d
authored
Nov 22, 2018
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Get rid of connect_t.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a1cee892
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
21 deletions
+21
-21
request.c
dlls/winhttp/request.c
+4
-4
session.c
dlls/winhttp/session.c
+9
-9
winhttp_private.h
dlls/winhttp/winhttp_private.h
+8
-8
No files found.
dlls/winhttp/request.c
View file @
dad2439d
...
...
@@ -1571,7 +1571,7 @@ static BOOL open_connection( request_t *request )
BOOL
is_secure
=
request
->
hdr
.
flags
&
WINHTTP_FLAG_SECURE
;
struct
hostdata
*
host
=
NULL
,
*
iter
;
netconn_t
*
netconn
=
NULL
;
connect_
t
*
connect
;
struct
connec
t
*
connect
;
WCHAR
*
addressW
=
NULL
;
INTERNET_PORT
port
;
DWORD
len
;
...
...
@@ -1751,7 +1751,7 @@ static BOOL add_host_header( request_t *request, DWORD modifier )
DWORD
len
;
WCHAR
*
host
;
static
const
WCHAR
fmt
[]
=
{
'%'
,
's'
,
':'
,
'%'
,
'u'
,
0
};
connect_
t
*
connect
=
request
->
connect
;
struct
connec
t
*
connect
=
request
->
connect
;
INTERNET_PORT
port
;
port
=
connect
->
hostport
?
connect
->
hostport
:
(
request
->
hdr
.
flags
&
WINHTTP_FLAG_SECURE
?
443
:
80
);
...
...
@@ -2175,7 +2175,7 @@ static BOOL send_request( request_t *request, LPCWSTR headers, DWORD headers_len
static
const
WCHAR
length_fmt
[]
=
{
'%'
,
'l'
,
'd'
,
0
};
BOOL
ret
=
FALSE
;
connect_
t
*
connect
=
request
->
connect
;
struct
connec
t
*
connect
=
request
->
connect
;
struct
session
*
session
=
connect
->
session
;
char
*
wire_req
;
int
bytes_sent
;
...
...
@@ -2623,7 +2623,7 @@ static BOOL handle_redirect( request_t *request, DWORD status )
BOOL
ret
=
FALSE
;
DWORD
len
,
len_loc
;
URL_COMPONENTS
uc
;
connect_
t
*
connect
=
request
->
connect
;
struct
connec
t
*
connect
=
request
->
connect
;
INTERNET_PORT
port
;
WCHAR
*
hostname
=
NULL
,
*
location
;
int
index
;
...
...
dlls/winhttp/session.c
View file @
dad2439d
...
...
@@ -322,7 +322,7 @@ end:
*/
static
void
connect_destroy
(
struct
object_header
*
hdr
)
{
connect_t
*
connect
=
(
connect_
t
*
)
hdr
;
struct
connect
*
connect
=
(
struct
connec
t
*
)
hdr
;
TRACE
(
"%p
\n
"
,
connect
);
...
...
@@ -337,7 +337,7 @@ static void connect_destroy( struct object_header *hdr )
static
BOOL
connect_query_option
(
struct
object_header
*
hdr
,
DWORD
option
,
void
*
buffer
,
DWORD
*
buflen
)
{
connect_t
*
connect
=
(
connect_
t
*
)
hdr
;
struct
connect
*
connect
=
(
struct
connec
t
*
)
hdr
;
switch
(
option
)
{
...
...
@@ -478,7 +478,7 @@ static BOOL should_bypass_proxy(struct session *session, LPCWSTR server)
return
ret
;
}
BOOL
set_server_for_hostname
(
connect_t
*
connect
,
LPCWSTR
server
,
INTERNET_PORT
port
)
BOOL
set_server_for_hostname
(
struct
connect
*
connect
,
const
WCHAR
*
server
,
INTERNET_PORT
port
)
{
struct
session
*
session
=
connect
->
session
;
BOOL
ret
=
TRUE
;
...
...
@@ -545,7 +545,7 @@ end:
*/
HINTERNET
WINAPI
WinHttpConnect
(
HINTERNET
hsession
,
LPCWSTR
server
,
INTERNET_PORT
port
,
DWORD
reserved
)
{
connect_
t
*
connect
;
struct
connec
t
*
connect
;
struct
session
*
session
;
HINTERNET
hconnect
=
NULL
;
...
...
@@ -567,7 +567,7 @@ HINTERNET WINAPI WinHttpConnect( HINTERNET hsession, LPCWSTR server, INTERNET_PO
set_last_error
(
ERROR_WINHTTP_INCORRECT_HANDLE_TYPE
);
return
NULL
;
}
if
(
!
(
connect
=
heap_alloc_zero
(
sizeof
(
connect_
t
)
)))
if
(
!
(
connect
=
heap_alloc_zero
(
sizeof
(
struct
connec
t
)
)))
{
release_object
(
&
session
->
hdr
);
return
NULL
;
...
...
@@ -987,7 +987,7 @@ static BOOL request_set_option( struct object_header *hdr, DWORD option, void *b
case
WINHTTP_OPTION_USERNAME
:
{
connect_
t
*
connect
=
request
->
connect
;
struct
connec
t
*
connect
=
request
->
connect
;
heap_free
(
connect
->
username
);
if
(
!
(
connect
->
username
=
buffer_to_str
(
buffer
,
buflen
)))
return
FALSE
;
...
...
@@ -995,7 +995,7 @@ static BOOL request_set_option( struct object_header *hdr, DWORD option, void *b
}
case
WINHTTP_OPTION_PASSWORD
:
{
connect_
t
*
connect
=
request
->
connect
;
struct
connec
t
*
connect
=
request
->
connect
;
heap_free
(
connect
->
password
);
if
(
!
(
connect
->
password
=
buffer_to_str
(
buffer
,
buflen
)))
return
FALSE
;
...
...
@@ -1110,7 +1110,7 @@ HINTERNET WINAPI WinHttpOpenRequest( HINTERNET hconnect, LPCWSTR verb, LPCWSTR o
LPCWSTR
referrer
,
LPCWSTR
*
types
,
DWORD
flags
)
{
request_t
*
request
;
connect_
t
*
connect
;
struct
connec
t
*
connect
;
HINTERNET
hrequest
=
NULL
;
TRACE
(
"%p, %s, %s, %s, %s, %p, 0x%08x
\n
"
,
hconnect
,
debugstr_w
(
verb
),
debugstr_w
(
object
),
...
...
@@ -1123,7 +1123,7 @@ HINTERNET WINAPI WinHttpOpenRequest( HINTERNET hconnect, LPCWSTR verb, LPCWSTR o
for
(
iter
=
types
;
*
iter
;
iter
++
)
TRACE
(
" %s
\n
"
,
debugstr_w
(
*
iter
));
}
if
(
!
(
connect
=
(
connect_
t
*
)
grab_object
(
hconnect
)))
if
(
!
(
connect
=
(
struct
connec
t
*
)
grab_object
(
hconnect
)))
{
set_last_error
(
ERROR_INVALID_HANDLE
);
return
NULL
;
...
...
dlls/winhttp/winhttp_private.h
View file @
dad2439d
...
...
@@ -97,19 +97,19 @@ struct session
DWORD
secure_protocols
;
};
typedef
stru
ct
struct
conne
ct
{
struct
object_header
hdr
;
struct
session
*
session
;
LPWSTR
hostname
;
/* final destination of the request */
LPWSTR
servername
;
/* name of the server we directly connect to */
LPWSTR
username
;
LPWSTR
password
;
WCHAR
*
hostname
;
/* final destination of the request */
WCHAR
*
servername
;
/* name of the server we directly connect to */
WCHAR
*
username
;
WCHAR
*
password
;
INTERNET_PORT
hostport
;
INTERNET_PORT
serverport
;
struct
sockaddr_storage
sockaddr
;
BOOL
resolved
;
}
connect_t
;
};
typedef
struct
{
...
...
@@ -171,7 +171,7 @@ struct authinfo
typedef
struct
{
struct
object_header
hdr
;
connect_
t
*
connect
;
struct
connec
t
*
connect
;
LPWSTR
verb
;
LPWSTR
path
;
LPWSTR
version
;
...
...
@@ -287,7 +287,7 @@ BOOL set_cookies( request_t *, const WCHAR * ) DECLSPEC_HIDDEN;
BOOL
add_cookie_headers
(
request_t
*
)
DECLSPEC_HIDDEN
;
BOOL
add_request_headers
(
request_t
*
,
LPCWSTR
,
DWORD
,
DWORD
)
DECLSPEC_HIDDEN
;
void
destroy_cookies
(
struct
session
*
)
DECLSPEC_HIDDEN
;
BOOL
set_server_for_hostname
(
connect_t
*
,
LPCWSTR
,
INTERNET_PORT
)
DECLSPEC_HIDDEN
;
BOOL
set_server_for_hostname
(
struct
connect
*
,
const
WCHAR
*
,
INTERNET_PORT
)
DECLSPEC_HIDDEN
;
void
destroy_authinfo
(
struct
authinfo
*
)
DECLSPEC_HIDDEN
;
void
release_host
(
struct
hostdata
*
host
)
DECLSPEC_HIDDEN
;
...
...
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