# HG changeset patch
# User John Calcote <john.calcote@gmail.com>
# Date 1491599282 21600
#      Fri Apr 07 15:08:02 2017 -0600
# Node ID b04612a6f65ae48d4f4b1b351caa429eab326b91
# Parent  95e918d8e0d90ffa7902073c1e70c976e00cc0b0
BUG#127: Fix broadcast functionality.

diff -r 95e918d8e0d9 -r b04612a6f65a common/slp_xcast.c
--- a/common/slp_xcast.c	Fri Apr 07 13:34:14 2017 -0600
+++ b/common/slp_xcast.c	Fri Apr 07 15:08:02 2017 -0600
@@ -70,6 +70,7 @@
       const SLPBuffer msg, SLPXcastSockets * socks)
 {
    int xferbytes;
+   int broadAddr = INADDR_BROADCAST;
    so_bool_t on = 1;
 
    for (socks->sock_count = 0;
@@ -95,7 +96,8 @@
                sizeof(ifaceinfo->bcast_addr[socks->sock_count]));
 
          SLPNetSetAddr(&socks->peeraddr[socks->sock_count], AF_INET,
-               (uint16_t)SLPPropertyAsInteger("net.slp.port"), 0);
+               (uint16_t)SLPPropertyAsInteger("net.slp.port"), 
+               (unsigned char *)&broadAddr);
          xferbytes = sendto(socks->sock[socks->sock_count],
                (char *)msg->start, (int)(msg->end - msg->start), 0,
                (struct sockaddr *)&socks->peeraddr[socks->sock_count],
diff -r 95e918d8e0d9 -r b04612a6f65a libslp/libslp_network.c
--- a/libslp/libslp_network.c	Fri Apr 07 13:34:14 2017 -0600
+++ b/libslp/libslp_network.c	Fri Apr 07 15:08:02 2017 -0600
@@ -1077,7 +1077,7 @@
       }
    }
 
-   usebroadcast = SLPPropertyAsBoolean("net.slp.useBroadcast");
+   usebroadcast = SLPPropertyAsBoolean("net.slp.isBroadcastOnly");
 
    /* multicast/broadcast wait timeouts */
    maxwait = SLPPropertyAsInteger("net.slp.multicastMaximumWait");
