Extending the testcases to use bluetooth
[oweals/gnunet.git] / src / transport / plugin_transport_udp_broadcasting.c
index a2278f29376d46c037a6a92c0a58de8dd59107ee..4b220d1568e32187cd9baa874601b90757e13954 100644 (file)
@@ -407,7 +407,7 @@ setup_broadcast (struct Plugin *plugin, struct sockaddr_in6 *serverAddrv6, struc
 
   /* create IPv4 broadcast socket */
   plugin->broadcast_ipv4 = GNUNET_NO;
-  if (plugin->sockv4 != NULL)
+  if ((GNUNET_YES == plugin->enable_ipv4) && (plugin->sockv4 != NULL))
   {
     int yes = 1;
 
@@ -435,7 +435,7 @@ setup_broadcast (struct Plugin *plugin, struct sockaddr_in6 *serverAddrv6, struc
   }
 
   plugin->broadcast_ipv6 = GNUNET_NO;
-  if (plugin->sockv6 != NULL)
+  if ((GNUNET_YES == plugin->enable_ipv6) && (plugin->sockv6 != NULL))
   {
     memset (&plugin->ipv6_multicast_address, 0, sizeof (struct sockaddr_in6));
     GNUNET_assert (1 ==