Compiles with default options now
FossilOrigin-Name: 3b07a845258f7f5bb5276e4ce0ee1974cdaaa80ecb48716360127f2c9610b4d2
This commit is contained in:
@ -147,7 +147,7 @@ int socklist_find_reply_socket(struct sockaddr *sa, int port)
|
||||
static int find_reply_socket(struct sockaddr *sa, int bc)
|
||||
{
|
||||
|
||||
//printf("Looking for best sock of: %s\n",sock_addr2str(sa));
|
||||
/* //printf("Looking for best sock of: %s\n",sock_addr2str(sa));*/
|
||||
|
||||
int bestsockfd = -1;
|
||||
int i;
|
||||
@ -279,13 +279,13 @@ int socklist_add_multicast(const char *addr, const char *port, int ac_proto)
|
||||
struct ipv6_mreq mreq;
|
||||
memset(&mreq, 0, sizeof(mreq));
|
||||
struct sockaddr_in6 *sain6 = (struct sockaddr_in6 *) res->ai_addr;
|
||||
// mreq.ipv6mr_multiaddr.s_addr=sain->sin_addr.s_addr;
|
||||
/*// mreq.ipv6mr_multiaddr.s_addr=sain->sin_addr.s_addr;*/
|
||||
memcpy(&mreq.ipv6mr_multiaddr.s6_addr, &sain6->sin6_addr.s6_addr,
|
||||
sizeof(sain6->sin6_addr.s6_addr));
|
||||
// int si = sizeof(sain6->sin6_addr.s6_addr);
|
||||
/*// int si = sizeof(sain6->sin6_addr.s6_addr);
|
||||
|
||||
// int i = sain6->sin6_addr.s6_addr;
|
||||
mreq.ipv6mr_interface = 0; //htonl(INADDR_ANY);
|
||||
*/ mreq.ipv6mr_interface = 0; /*//htonl(INADDR_ANY);*/
|
||||
opt = &mreq;
|
||||
optlen = sizeof(mreq);
|
||||
if (setsockopt(sockfd, IPPROTO_IPV6, IPV6_JOIN_GROUP, opt, optlen)
|
||||
@ -300,7 +300,7 @@ int socklist_add_multicast(const char *addr, const char *port, int ac_proto)
|
||||
int rfd = find_reply_socket(sa, 0);
|
||||
|
||||
socklist[socklist_len].sockfd = sockfd;
|
||||
// socklist[socklist_len].reply_sockfd = rfd;
|
||||
/*// socklist[socklist_len].reply_sockfd = rfd;*/
|
||||
socklist[socklist_len].type = SOCKLIST_BCASTMCAST_SOCKET;
|
||||
socklist[socklist_len].family = sa->sa_family;
|
||||
socklist[socklist_len].ac_proto = ac_proto;
|
||||
@ -385,7 +385,7 @@ int socklist_add_unicast(const char *addr, const char *port, int ac_proto)
|
||||
|
||||
|
||||
socklist[socklist_len].sockfd = sockfd;
|
||||
// socklist[socklist_len].reply_sockfd = sockfd;
|
||||
/*// socklist[socklist_len].reply_sockfd = sockfd;*/
|
||||
socklist[socklist_len].family = sa->sa_family;
|
||||
socklist[socklist_len].type = SOCKLIST_UNICAST_SOCKET;
|
||||
socklist[socklist_len].ac_proto = ac_proto;
|
||||
@ -502,7 +502,7 @@ int socklist_add_broadcast(const char *addr, const char *port, int ac_proto)
|
||||
int rfd = find_reply_socket(sa, 1);
|
||||
|
||||
socklist[socklist_len].sockfd = sockfd;
|
||||
// socklist[socklist_len].reply_sockfd = rfd;
|
||||
/*// socklist[socklist_len].reply_sockfd = rfd;*/
|
||||
socklist[socklist_len].type = SOCKLIST_BCASTMCAST_SOCKET;
|
||||
socklist[socklist_len].family = sa->sa_family;
|
||||
socklist[socklist_len].ac_proto = ac_proto;
|
||||
@ -510,9 +510,9 @@ int socklist_add_broadcast(const char *addr, const char *port, int ac_proto)
|
||||
memcpy(&socklist[socklist_len].addr, res->ai_addr,
|
||||
sock_addrlen(res->ai_addr));
|
||||
|
||||
// printf ("AC INIT PROTO : %d, i %i\n",ac_proto,socklist_len);
|
||||
/*// printf ("AC INIT PROTO : %d, i %i\n",ac_proto,socklist_len);
|
||||
// printf ("sock proto %d\n",socklist[socklist_len].ac_proto);
|
||||
socklist_len++;
|
||||
*/ socklist_len++;
|
||||
|
||||
cw_log(LOG_INFO, "Bound to broadcast: %s:%s (%i,R:%i,I:%d)", addr, port,
|
||||
sockfd, rfd, socklist_len - 1);
|
||||
|
Reference in New Issue
Block a user