Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
5163be8e
Commit
5163be8e
authored
Mar 03, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a compiler warning and simplify
parent
6a84cf10
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
src/network/getaddrinfo.c
src/network/getaddrinfo.c
+7
-12
No files found.
src/network/getaddrinfo.c
View file @
5163be8e
...
@@ -470,8 +470,6 @@ static WINAPI int _ws2_getnameinfo_bind( const struct sockaddr *sa, socklen_t sa
...
@@ -470,8 +470,6 @@ static WINAPI int _ws2_getnameinfo_bind( const struct sockaddr *sa, socklen_t sa
static
WINAPI
int
_ws2_getaddrinfo_bind
(
const
char
*
node
,
const
char
*
service
,
static
WINAPI
int
_ws2_getaddrinfo_bind
(
const
char
*
node
,
const
char
*
service
,
const
struct
addrinfo
*
hints
,
struct
addrinfo
**
res
);
const
struct
addrinfo
*
hints
,
struct
addrinfo
**
res
);
static
WINAPI
void
_ws2_freeaddrinfo_bind
(
struct
addrinfo
*
infos
);
static
GETNAMEINFO
ws2_getnameinfo
=
_ws2_getnameinfo_bind
;
static
GETNAMEINFO
ws2_getnameinfo
=
_ws2_getnameinfo_bind
;
static
GETADDRINFO
ws2_getaddrinfo
=
_ws2_getaddrinfo_bind
;
static
GETADDRINFO
ws2_getaddrinfo
=
_ws2_getaddrinfo_bind
;
static
FREEADDRINFO
ws2_freeaddrinfo
;
static
FREEADDRINFO
ws2_freeaddrinfo
;
...
@@ -508,6 +506,8 @@ static WINAPI int _ws2_getnameinfo_bind( const struct sockaddr *sa, socklen_t sa
...
@@ -508,6 +506,8 @@ static WINAPI int _ws2_getnameinfo_bind( const struct sockaddr *sa, socklen_t sa
WSASetLastError
(
WSAEAFNOSUPPORT
);
WSASetLastError
(
WSAEAFNOSUPPORT
);
return
EAI_FAMILY
;
return
EAI_FAMILY
;
}
}
#undef getnameinfo
#define getnameinfo ws2_getnameinfo
static
WINAPI
int
_ws2_getaddrinfo_bind
(
const
char
*
node
,
const
char
*
service
,
static
WINAPI
int
_ws2_getaddrinfo_bind
(
const
char
*
node
,
const
char
*
service
,
const
struct
addrinfo
*
hints
,
struct
addrinfo
**
res
)
const
struct
addrinfo
*
hints
,
struct
addrinfo
**
res
)
...
@@ -525,6 +525,11 @@ static WINAPI int _ws2_getaddrinfo_bind(const char *node, const char *service,
...
@@ -525,6 +525,11 @@ static WINAPI int _ws2_getaddrinfo_bind(const char *node, const char *service,
WSASetLastError
(
WSAHOST_NOT_FOUND
);
WSASetLastError
(
WSAHOST_NOT_FOUND
);
return
EAI_NONAME
;
return
EAI_NONAME
;
}
}
#undef getaddrinfo
#undef freeaddrinfo
#define getaddrinfo ws2_getaddrinfo
#define freeaddrinfo ws2_freeaddrinfo
#define HAVE_GETADDRINFO
#endif
#endif
...
@@ -547,11 +552,7 @@ int vlc_getnameinfo( const struct sockaddr *sa, int salen,
...
@@ -547,11 +552,7 @@ int vlc_getnameinfo( const struct sockaddr *sa, int salen,
i_servlen
=
0
;
i_servlen
=
0
;
}
}
#ifndef WIN32
i_val
=
getnameinfo
(
sa
,
salen
,
host
,
hostlen
,
psz_serv
,
i_servlen
,
flags
);
i_val
=
getnameinfo
(
sa
,
salen
,
host
,
hostlen
,
psz_serv
,
i_servlen
,
flags
);
#else
i_val
=
ws2_getnameinfo
(
sa
,
salen
,
host
,
hostlen
,
psz_serv
,
i_servlen
,
flags
);
#endif
if
(
portnum
!=
NULL
)
if
(
portnum
!=
NULL
)
*
portnum
=
atoi
(
psz_serv
);
*
portnum
=
atoi
(
psz_serv
);
...
@@ -666,8 +667,6 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node,
...
@@ -666,8 +667,6 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node,
}
}
# endif
# endif
return
getaddrinfo
(
psz_node
,
psz_service
,
&
hints
,
res
);
return
getaddrinfo
(
psz_node
,
psz_service
,
&
hints
,
res
);
#elif defined (WIN32)
return
ws2_getaddrinfo
(
psz_node
,
psz_service
,
&
hints
,
res
);
#else
#else
int
ret
;
int
ret
;
vlc_value_t
lock
;
vlc_value_t
lock
;
...
@@ -685,9 +684,5 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node,
...
@@ -685,9 +684,5 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node,
void
vlc_freeaddrinfo
(
struct
addrinfo
*
infos
)
void
vlc_freeaddrinfo
(
struct
addrinfo
*
infos
)
{
{
#ifndef WIN32
freeaddrinfo
(
infos
);
freeaddrinfo
(
infos
);
#else
ws2_freeaddrinfo
(
infos
);
#endif
}
}
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