Commit c7a82a0c authored by Jean-Paul Saman's avatar Jean-Paul Saman

dvbinfo: fix bugs that prevented multicast from working

parent 302f8bc9
...@@ -284,16 +284,17 @@ int udp_open(const char *interface, const char *ipaddress, int port) ...@@ -284,16 +284,17 @@ int udp_open(const char *interface, const char *ipaddress, int port)
continue; continue;
} }
const struct sockaddr_storage *saddr = (const struct sockaddr_storage *)&ptr->ai_addr; const struct sockaddr_storage *saddr = (const struct sockaddr_storage *)ptr->ai_addr;
if (is_multicast(saddr, ptr->ai_addrlen) && if (is_multicast(saddr, ptr->ai_addrlen))
mcast_connect(s_ctl, interface, saddr, ptr->ai_addrlen))
{ {
close(s_ctl); if (!mcast_connect(s_ctl, interface, saddr, ptr->ai_addrlen))
s_ctl = -1; {
perror("mcast connect error"); close(s_ctl);
continue; s_ctl = -1;
perror("mcast connect error");
continue;
}
} }
break; break;
} }
......
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