mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2024-12-24 20:01:42 +00:00
Chris's patch
This commit is contained in:
parent
3347f5d345
commit
aa2c316093
@ -883,12 +883,11 @@ int start_upd_srv(const char *addr_str, unsigned port)
|
||||
|
||||
struct sockaddr_in servaddr;
|
||||
servaddr.sin_family = AF_INET;
|
||||
servaddr.sin_addr.s_addr = addr;
|
||||
servaddr.sin_port = htons(port);
|
||||
if (IN_MULTICAST(addr))
|
||||
servaddr.sin_addr.s_addr = addr;
|
||||
servaddr.sin_addr.s_addr = htonl(addr);
|
||||
else
|
||||
servaddr.sin_addr.s_addr = INADDR_ANY;
|
||||
servaddr.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
|
||||
if (bind(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) != 0)
|
||||
{
|
||||
@ -904,7 +903,7 @@ int start_upd_srv(const char *addr_str, unsigned port)
|
||||
struct ip_mreq group;
|
||||
group.imr_multiaddr.s_addr = htonl(addr);
|
||||
group.imr_interface.s_addr = htonl(INADDR_ANY);
|
||||
if (setsockopt(infd, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char *)&group, sizeof(group)) < 0)
|
||||
if (setsockopt(sockfd, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char *)&group, sizeof(group)) < 0)
|
||||
{
|
||||
#if _WIN32
|
||||
wprintf(L"setsockopt() error: %ld\n", WSAGetLastError());
|
||||
|
@ -18,7 +18,7 @@ void params_dump(void)
|
||||
mprint ("Network, UDP/%u",ccx_options.udpport);
|
||||
else
|
||||
{
|
||||
mprint ("Network, %s:%d",ccx_options.udpport, ccx_options.udpport);
|
||||
mprint ("Network, %s:%d",ccx_options.udpaddr, ccx_options.udpport);
|
||||
}
|
||||
break;
|
||||
case CCX_DS_TCP:
|
||||
|
Loading…
Reference in New Issue
Block a user