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
7b9e62c2
Commit
7b9e62c2
authored
Aug 19, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vlc_getaddrinfo: pass AI_IDN explicitly where applicable
parent
b0b8f4c4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
17 deletions
+11
-17
include/vlc_network.h
include/vlc_network.h
+3
-0
modules/stream_out/standard.c
modules/stream_out/standard.c
+1
-1
src/network/getaddrinfo.c
src/network/getaddrinfo.c
+1
-10
src/network/io.c
src/network/io.c
+1
-1
src/network/tcp.c
src/network/tcp.c
+2
-2
src/network/udp.c
src/network/udp.c
+3
-3
No files found.
include/vlc_network.h
View file @
7b9e62c2
...
...
@@ -224,6 +224,9 @@ VLC_API ssize_t net_vaPrintf( vlc_object_t *p_this, int fd, const v_socket_t *,
#ifndef AI_NUMERICSERV
# define AI_NUMERICSERV 0
#endif
#ifndef AI_IDN
# define AI_IDN 0
/* GNU/libc extension */
#endif
#ifdef __OS2__
# ifndef NI_NUMERICHOST
...
...
modules/stream_out/standard.c
View file @
7b9e62c2
...
...
@@ -157,7 +157,7 @@ static void create_SDP(sout_stream_t *p_stream, sout_access_out_t *p_access)
.
ai_family
=
AF_UNSPEC
,
.
ai_socktype
=
SOCK_DGRAM
,
.
ai_protocol
=
0
,
.
ai_flags
=
AI_NUMERICHOST
|
AI_NUMERICSERV
.
ai_flags
=
AI_NUMERICHOST
|
AI_NUMERICSERV
|
AI_IDN
,
};
char
*
shost
=
var_GetNonEmptyString
(
p_access
,
"src-addr"
);
char
*
dhost
=
var_GetNonEmptyString
(
p_access
,
"dst-addr"
);
...
...
src/network/getaddrinfo.c
View file @
7b9e62c2
...
...
@@ -166,19 +166,10 @@ int vlc_getaddrinfo (const char *node, unsigned port,
goto
out
;
hints
.
ai_flags
&=
~
AI_NUMERICHOST
;
}
#endif
#ifdef AI_IDN
/* Run-time I18n Domain Names support */
hints
.
ai_flags
|=
AI_IDN
;
ret
=
getaddrinfo
(
node
,
servname
,
&
hints
,
res
);
if
(
ret
!=
EAI_BADFLAGS
)
goto
out
;
/* IDN not available: disable and retry without it */
hints
.
ai_flags
&=
~
AI_IDN
;
#endif
ret
=
getaddrinfo
(
node
,
servname
,
&
hints
,
res
);
#if defined(
AI_IDN) || defined(
WIN32)
#if defined(WIN32)
out:
#endif
return
ret
;
...
...
src/network/io.c
View file @
7b9e62c2
...
...
@@ -130,7 +130,7 @@ int *net_Listen (vlc_object_t *p_this, const char *psz_host,
struct
addrinfo
hints
=
{
.
ai_socktype
=
type
,
.
ai_protocol
=
protocol
,
.
ai_flags
=
AI_PASSIVE
|
AI_NUMERICSERV
,
.
ai_flags
=
AI_PASSIVE
|
AI_NUMERICSERV
|
AI_IDN
,
},
*
res
;
msg_Dbg
(
p_this
,
"net: listening to %s port %d"
,
...
...
src/network/tcp.c
View file @
7b9e62c2
...
...
@@ -134,7 +134,7 @@ int net_Connect( vlc_object_t *p_this, const char *psz_host, int i_port,
struct
addrinfo
hints
=
{
.
ai_socktype
=
type
,
.
ai_protocol
=
proto
,
.
ai_flags
=
AI_NUMERICSERV
,
.
ai_flags
=
AI_NUMERICSERV
|
AI_IDN
,
},
*
res
;
int
val
=
vlc_getaddrinfo
(
psz_realhost
,
i_realport
,
&
hints
,
&
res
);
...
...
@@ -450,7 +450,7 @@ static int SocksHandshakeTCP( vlc_object_t *p_obj,
.
ai_family
=
AF_INET
,
.
ai_socktype
=
SOCK_STREAM
,
.
ai_protocol
=
IPPROTO_TCP
,
.
ai_flags
=
0
,
.
ai_flags
=
AI_IDN
,
};
struct
addrinfo
*
res
;
...
...
src/network/udp.c
View file @
7b9e62c2
...
...
@@ -141,7 +141,7 @@ static int net_ListenSingle (vlc_object_t *obj, const char *host, int port,
struct
addrinfo
hints
=
{
.
ai_socktype
=
SOCK_DGRAM
,
.
ai_protocol
=
protocol
,
.
ai_flags
=
AI_PASSIVE
|
AI_NUMERICSERV
,
.
ai_flags
=
AI_PASSIVE
|
AI_NUMERICSERV
|
AI_IDN
,
},
*
res
;
if
(
host
&&
!*
host
)
...
...
@@ -506,7 +506,7 @@ int net_ConnectDgram( vlc_object_t *p_this, const char *psz_host, int i_port,
struct
addrinfo
hints
=
{
.
ai_socktype
=
SOCK_DGRAM
,
.
ai_protocol
=
proto
,
.
ai_flags
=
AI_NUMERICSERV
,
.
ai_flags
=
AI_NUMERICSERV
|
AI_IDN
,
},
*
res
;
int
i_handle
=
-
1
;
bool
b_unreach
=
false
;
...
...
@@ -604,7 +604,7 @@ int net_OpenDgram( vlc_object_t *obj, const char *psz_bind, int i_bind,
struct
addrinfo
hints
=
{
.
ai_socktype
=
SOCK_DGRAM
,
.
ai_protocol
=
protocol
,
.
ai_flags
=
AI_NUMERICSERV
,
.
ai_flags
=
AI_NUMERICSERV
|
AI_IDN
,
},
*
loc
,
*
rem
;
int
val
=
vlc_getaddrinfo
(
psz_server
,
i_server
,
&
hints
,
&
rem
);
...
...
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