Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
e95b2584
Commit
e95b2584
authored
Mar 11, 2005
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fix bug #1854
parent
170ce706
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
12 deletions
+9
-12
src/misc/httpd.c
src/misc/httpd.c
+9
-12
No files found.
src/misc/httpd.c
View file @
e95b2584
...
@@ -931,25 +931,16 @@ httpd_host_t *httpd_TLSHostNew( vlc_object_t *p_this, char *psz_host,
...
@@ -931,25 +931,16 @@ httpd_host_t *httpd_TLSHostNew( vlc_object_t *p_this, char *psz_host,
vlc_value_t
val
;
vlc_value_t
val
;
char
psz_port
[
6
];
char
psz_port
[
6
];
struct
addrinfo
hints
;
struct
addrinfo
hints
;
int
res
;
memset
(
&
hints
,
0
,
sizeof
(
hints
)
);
memset
(
&
hints
,
0
,
sizeof
(
hints
)
);
#if 0
/*
* For now, keep IPv4 by default. That said, it should be safe to use
* IPv6 by default *on the server side*, as, apart from NetBSD, most
* systems accept IPv4 clients on IPv6 listening sockets.
*/
hints.ai_family = PF_INET;
#else
hints
.
ai_family
=
0
;
/* Check if ipv4 or ipv6 were forced */
/* Check if ipv4 or ipv6 were forced */
var_Create
(
p_this
,
"ipv4"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_this
,
"ipv4"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
var_Get
(
p_this
,
"ipv4"
,
&
val
);
var_Get
(
p_this
,
"ipv4"
,
&
val
);
if
(
val
.
b_bool
)
if
(
val
.
b_bool
)
hints
.
ai_family
=
PF_INET
;
hints
.
ai_family
=
PF_INET
;
#endif
var_Create
(
p_this
,
"ipv6"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_this
,
"ipv6"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
var_Get
(
p_this
,
"ipv6"
,
&
val
);
var_Get
(
p_this
,
"ipv6"
,
&
val
);
if
(
val
.
b_bool
)
if
(
val
.
b_bool
)
...
@@ -964,9 +955,15 @@ httpd_host_t *httpd_TLSHostNew( vlc_object_t *p_this, char *psz_host,
...
@@ -964,9 +955,15 @@ httpd_host_t *httpd_TLSHostNew( vlc_object_t *p_this, char *psz_host,
snprintf
(
psz_port
,
sizeof
(
psz_port
),
"%d"
,
i_port
);
snprintf
(
psz_port
,
sizeof
(
psz_port
),
"%d"
,
i_port
);
psz_port
[
sizeof
(
psz_port
)
-
1
]
=
'\0'
;
psz_port
[
sizeof
(
psz_port
)
-
1
]
=
'\0'
;
if
(
getaddrinfo
(
psz_host
,
psz_port
,
&
hints
,
&
res
)
)
res
=
getaddrinfo
(
psz_host
,
psz_port
,
&
hints
,
&
res
);
if
(
res
!=
0
)
{
{
#ifdef HAVE_GAI_STRERROR
msg_Err
(
p_this
,
"cannot resolve %s:%d : %s"
,
psz_host
,
i_port
,
gai_strerror
(
res
)
);
#else
msg_Err
(
p_this
,
"cannot resolve %s:%d"
,
psz_host
,
i_port
);
msg_Err
(
p_this
,
"cannot resolve %s:%d"
,
psz_host
,
i_port
);
#endif
return
NULL
;
return
NULL
;
}
}
}
}
...
...
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