udp: fix gst_udp_set_loop_ttl() again

Fix the gst_udp_set_loop_ttl() function that was commented out in a
previous commit. See #573115.
This commit is contained in:
Jan Smout 2009-02-26 13:19:31 +01:00 committed by Wim Taymans
parent af2e8f8470
commit 474d9d7a9b

View file

@ -115,12 +115,17 @@ beach:
int
gst_udp_set_loop_ttl (int sockfd, gboolean loop, int ttl)
{
socklen_t socklen;
struct sockaddr_storage addr;
int ret = -1;
#if 0
int l = (loop == FALSE) ? 0 : 1;
switch (addr->ss_family) {
socklen = sizeof (addr);
if ((ret = getsockname (sockfd, (struct sockaddr *) &addr, &socklen)) < 0) {
return ret;
}
switch (addr.ss_family) {
case AF_INET:
{
if ((ret =
@ -151,7 +156,6 @@ gst_udp_set_loop_ttl (int sockfd, gboolean loop, int ttl)
default:
errno = EAFNOSUPPORT;
}
#endif
return ret;
}