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
...@@ -203,34 +203,12 @@ __getnameinfo( const struct sockaddr *sa, socklen_t salen, ...@@ -203,34 +203,12 @@ __getnameinfo( const struct sockaddr *sa, socklen_t salen,
} }
if (serv != NULL) if (serv != NULL)
{
struct servent *sent = NULL;
#ifndef SYS_BEOS /* No getservbyport() */
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", snprintf (serv, servlen, "%u",
(unsigned int)ntohs (addr->sin_port)); (unsigned int)ntohs (addr->sin_port));
serv[servlen - 1] = '\0'; 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