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
d89279a9
Commit
d89279a9
authored
Mar 01, 2004
by
Juan Lang
Committed by
Alexandre Julliard
Mar 01, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Connect to winehq.org by its name rather than by its IP addr.
parent
dbcc37ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
send.c
programs/winetest/send.c
+14
-4
No files found.
programs/winetest/send.c
View file @
d89279a9
...
...
@@ -24,20 +24,30 @@
#include "winetest.h"
SOCKET
open_http
(
const
char
*
ipnum
)
open_http
(
const
char
*
server
)
{
WSADATA
wsad
;
struct
sockaddr_in
sa
;
SOCKET
s
;
report
(
R_STATUS
,
"Opening HTTP connection to %s"
,
ipnum
);
report
(
R_STATUS
,
"Opening HTTP connection to %s"
,
server
);
if
(
WSAStartup
(
MAKEWORD
(
2
,
2
),
&
wsad
))
return
INVALID_SOCKET
;
s
=
socket
(
AF_INET
,
SOCK_STREAM
,
IPPROTO_TCP
);
if
(
s
!=
INVALID_SOCKET
)
{
unsigned
long
addr
=
inet_addr
(
server
);
sa
.
sin_family
=
AF_INET
;
sa
.
sin_port
=
htons
(
80
);
sa
.
sin_addr
.
s_addr
=
inet_addr
(
ipnum
);
if
(
addr
!=
INADDR_NONE
)
sa
.
sin_addr
.
s_addr
=
addr
;
else
{
struct
hostent
*
host
;
if
((
host
=
gethostbyname
(
server
))
!=
NULL
)
addr
=
((
struct
in_addr
*
)
host
->
h_addr
)
->
s_addr
;
}
if
(
!
connect
(
s
,
(
struct
sockaddr
*
)
&
sa
,
sizeof
(
struct
sockaddr_in
)))
return
s
;
...
...
@@ -113,7 +123,7 @@ send_file (const char *name)
"--"
SEP
"--
\r\n
"
;
buffer
=
xmalloc
(
BUFLEN
+
1
);
s
=
open_http
(
"
198.144.15.226
"
);
s
=
open_http
(
"
www.winehq.org
"
);
if
(
s
==
INVALID_SOCKET
)
{
report
(
R_WARNING
,
"Can't open network connection: %d"
,
WSAGetLastError
());
...
...
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