Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
d89279a9
Commit
d89279a9
authored
21 years ago
by
Juan Lang
Committed by
Alexandre Julliard
21 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Connect to winehq.org by its name rather than by its IP addr.
parent
dbcc37ba
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
programs/winetest/send.c
+14
-4
14 additions, 4 deletions
programs/winetest/send.c
with
14 additions
and
4 deletions
programs/winetest/send.c
+
14
−
4
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
());
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment