Commit 419f5e33 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove dead code:

VLC never resolves network service names, it only uses port numbers.
parent abb46dc5
...@@ -204,31 +204,9 @@ __getnameinfo( const struct sockaddr *sa, socklen_t salen, ...@@ -204,31 +204,9 @@ __getnameinfo( const struct sockaddr *sa, socklen_t salen,
if (serv != NULL) if (serv != NULL)
{ {
struct servent *sent = NULL; snprintf (serv, servlen, "%u",
(unsigned int)ntohs (addr->sin_port));
#ifndef SYS_BEOS /* No getservbyport() */ serv[servlen - 1] = '\0';
int solved = 0;
/* service name resolution */
if (!(flags & NI_NUMERICSERV))
{
sent = getservbyport(addr->sin_port,
(flags & NI_DGRAM)
? "udp" : "tcp");
if (sent != NULL)
{
strlcpy (serv, sent->s_name, servlen);
solved = 1;
}
}
if (sent == NULL)
#endif
{
snprintf (serv, servlen, "%u",
(unsigned int)ntohs (addr->sin_port));
serv[servlen - 1] = '\0';
}
} }
} }
return 0; return 0;
...@@ -476,7 +454,7 @@ __getaddrinfo (const char *node, const char *service, ...@@ -476,7 +454,7 @@ __getaddrinfo (const char *node, const char *service,
protocol = IPPROTO_UDP; protocol = IPPROTO_UDP;
break; break;
#ifndef SYS_BEOS #ifndef SOCK_RAW
case SOCK_RAW: case SOCK_RAW:
#endif #endif
case 0: case 0:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment