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
646b9cae
Commit
646b9cae
authored
Jul 08, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Jul 09, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Convert connect_t's address type from a struct sockaddr_in to a struct sockaddr_storage.
parent
831c87c1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
request.c
dlls/winhttp/request.c
+13
-3
winhttp_private.h
dlls/winhttp/winhttp_private.h
+1
-1
No files found.
dlls/winhttp/request.c
View file @
646b9cae
...
...
@@ -713,6 +713,7 @@ BOOL WINAPI WinHttpQueryHeaders( HINTERNET hrequest, DWORD level, LPCWSTR name,
static
BOOL
open_connection
(
request_t
*
request
)
{
connect_t
*
connect
;
const
void
*
addr
;
char
address
[
32
];
WCHAR
*
addressW
;
INTERNET_PORT
port
;
...
...
@@ -727,16 +728,25 @@ static BOOL open_connection( request_t *request )
slen
=
sizeof
(
connect
->
sockaddr
);
if
(
!
netconn_resolve
(
connect
->
servername
,
port
,
(
struct
sockaddr
*
)
&
connect
->
sockaddr
,
&
slen
))
return
FALSE
;
inet_ntop
(
connect
->
sockaddr
.
sin_family
,
&
connect
->
sockaddr
.
sin_addr
,
address
,
sizeof
(
address
)
);
switch
(
connect
->
sockaddr
.
ss_family
)
{
case
AF_INET
:
addr
=
&
((
struct
sockaddr_in
*
)
&
connect
->
sockaddr
)
->
sin_addr
;
break
;
default:
WARN
(
"unsupported address family %d
\n
"
,
connect
->
sockaddr
.
ss_family
);
return
FALSE
;
}
inet_ntop
(
connect
->
sockaddr
.
ss_family
,
addr
,
address
,
sizeof
(
address
)
);
addressW
=
strdupAW
(
address
);
send_callback
(
&
request
->
hdr
,
WINHTTP_CALLBACK_STATUS_NAME_RESOLVED
,
addressW
,
strlenW
(
addressW
)
+
1
);
TRACE
(
"connecting to %s:%u
\n
"
,
address
,
ntohs
(
connect
->
sockaddr
.
sin_port
)
);
TRACE
(
"connecting to %s:%u
\n
"
,
address
,
port
);
send_callback
(
&
request
->
hdr
,
WINHTTP_CALLBACK_STATUS_CONNECTING_TO_SERVER
,
addressW
,
0
);
if
(
!
netconn_create
(
&
request
->
netconn
,
connect
->
sockaddr
.
s
in
_family
,
SOCK_STREAM
,
0
))
if
(
!
netconn_create
(
&
request
->
netconn
,
connect
->
sockaddr
.
s
s
_family
,
SOCK_STREAM
,
0
))
{
heap_free
(
addressW
);
return
FALSE
;
...
...
dlls/winhttp/winhttp_private.h
View file @
646b9cae
...
...
@@ -110,7 +110,7 @@ typedef struct
LPWSTR
password
;
INTERNET_PORT
hostport
;
INTERNET_PORT
serverport
;
struct
sockaddr_
in
sockaddr
;
struct
sockaddr_
storage
sockaddr
;
}
connect_t
;
typedef
struct
...
...
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