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:
parent
af2e8f8470
commit
474d9d7a9b
@ -115,12 +115,17 @@ beach:
|
|||||||
int
|
int
|
||||||
gst_udp_set_loop_ttl (int sockfd, gboolean loop, int ttl)
|
gst_udp_set_loop_ttl (int sockfd, gboolean loop, int ttl)
|
||||||
{
|
{
|
||||||
|
socklen_t socklen;
|
||||||
|
struct sockaddr_storage addr;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
#if 0
|
|
||||||
int l = (loop == FALSE) ? 0 : 1;
|
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:
|
case AF_INET:
|
||||||
{
|
{
|
||||||
if ((ret =
|
if ((ret =
|
||||||
@ -151,7 +156,6 @@ gst_udp_set_loop_ttl (int sockfd, gboolean loop, int ttl)
|
|||||||
default:
|
default:
|
||||||
errno = EAFNOSUPPORT;
|
errno = EAFNOSUPPORT;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user