aboutsummaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-12-17 20:29:24 +0000
committerChristian Grothoff <christian@grothoff.org>2013-12-17 20:29:24 +0000
commitd969abc1fce8c27ff7bcddcd31d440b636c04e9d (patch)
tree0e56b5d1d7d42fe3855dcce1eae1063adecbe098 /src/transport
parent78e4d67de40513659c205c3e675304aa5274f43d (diff)
downloadgnunet-d969abc1fce8c27ff7bcddcd31d440b636c04e9d.tar.gz
gnunet-d969abc1fce8c27ff7bcddcd31d440b636c04e9d.zip
Fix assertion failure seen on buildbot ubuntu-armv71-evans,
build 769: .Dec 17 21:19:40-025205 transport-20588 ERROR Assertion failed at plugin_transport_udp_broadcasting.c:253.
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/plugin_transport_udp_broadcasting.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/transport/plugin_transport_udp_broadcasting.c b/src/transport/plugin_transport_udp_broadcasting.c
index 0503e413a..35c2a0ea5 100644
--- a/src/transport/plugin_transport_udp_broadcasting.c
+++ b/src/transport/plugin_transport_udp_broadcasting.c
@@ -599,13 +599,19 @@ setup_broadcast (struct Plugin *plugin,
599 const struct GNUNET_MessageHeader *hello; 599 const struct GNUNET_MessageHeader *hello;
600 600
601 hello = plugin->env->get_our_hello (); 601 hello = plugin->env->get_our_hello ();
602 if (GNUNET_YES == GNUNET_HELLO_is_friend_only((const struct GNUNET_HELLO_Message *) hello)) 602 if (GNUNET_YES ==
603 GNUNET_HELLO_is_friend_only ((const struct GNUNET_HELLO_Message *) hello))
603 { 604 {
604 LOG (GNUNET_ERROR_TYPE_WARNING, 605 LOG (GNUNET_ERROR_TYPE_WARNING,
605 _("Disabling HELLO broadcasting due to friend-to-friend only configuration!\n")); 606 _("Disabling HELLO broadcasting due to friend-to-friend only configuration!\n"));
606 return; 607 return;
607 } 608 }
608 609
610 /* always create tokenizers */
611 plugin->broadcast_ipv4_mst =
612 GNUNET_SERVER_mst_create (&broadcast_ipv4_mst_cb, plugin);
613 plugin->broadcast_ipv6_mst =
614 GNUNET_SERVER_mst_create (&broadcast_ipv6_mst_cb, plugin);
609 /* create IPv4 broadcast socket */ 615 /* create IPv4 broadcast socket */
610 if ((GNUNET_YES == plugin->enable_ipv4) && (NULL != plugin->sockv4)) 616 if ((GNUNET_YES == plugin->enable_ipv4) && (NULL != plugin->sockv4))
611 { 617 {
@@ -619,12 +625,6 @@ setup_broadcast (struct Plugin *plugin,
619 _("Failed to set IPv4 broadcast option for broadcast socket on port %d\n"), 625 _("Failed to set IPv4 broadcast option for broadcast socket on port %d\n"),
620 ntohs (server_addrv4->sin_port)); 626 ntohs (server_addrv4->sin_port));
621 } 627 }
622 else
623 {
624 plugin->broadcast_ipv4_mst =
625 GNUNET_SERVER_mst_create (broadcast_ipv4_mst_cb, plugin);
626 LOG (GNUNET_ERROR_TYPE_DEBUG, "IPv4 Broadcasting running\n");
627 }
628 } 628 }
629 if ((GNUNET_YES == plugin->enable_ipv6) && (plugin->sockv6 != NULL)) 629 if ((GNUNET_YES == plugin->enable_ipv6) && (plugin->sockv6 != NULL))
630 { 630 {
@@ -634,8 +634,6 @@ setup_broadcast (struct Plugin *plugin,
634 &plugin->ipv6_multicast_address.sin6_addr)); 634 &plugin->ipv6_multicast_address.sin6_addr));
635 plugin->ipv6_multicast_address.sin6_family = AF_INET6; 635 plugin->ipv6_multicast_address.sin6_family = AF_INET6;
636 plugin->ipv6_multicast_address.sin6_port = htons (plugin->port); 636 plugin->ipv6_multicast_address.sin6_port = htons (plugin->port);
637 plugin->broadcast_ipv6_mst =
638 GNUNET_SERVER_mst_create (broadcast_ipv6_mst_cb, plugin);
639 } 637 }
640 GNUNET_OS_network_interfaces_list (&iface_proc, plugin); 638 GNUNET_OS_network_interfaces_list (&iface_proc, plugin);
641} 639}
@@ -687,10 +685,16 @@ stop_broadcast (struct Plugin *plugin)
687 GNUNET_free (p->addr); 685 GNUNET_free (p->addr);
688 GNUNET_free (p); 686 GNUNET_free (p);
689 } 687 }
690 if (plugin->broadcast_ipv4_mst != NULL) 688 if (NULL != plugin->broadcast_ipv4_mst)
689 {
691 GNUNET_SERVER_mst_destroy (plugin->broadcast_ipv4_mst); 690 GNUNET_SERVER_mst_destroy (plugin->broadcast_ipv4_mst);
692 if (plugin->broadcast_ipv6_mst != NULL) 691 plugin->broadcast_ipv4_mst = NULL;
692 }
693 if (NULL != plugin->broadcast_ipv6_mst)
694 {
693 GNUNET_SERVER_mst_destroy (plugin->broadcast_ipv6_mst); 695 GNUNET_SERVER_mst_destroy (plugin->broadcast_ipv6_mst);
696 plugin->broadcast_ipv6_mst = NULL;
697 }
694} 698}
695 699
696/* end of plugin_transport_udp_broadcasting.c */ 700/* end of plugin_transport_udp_broadcasting.c */