aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_wlan.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-02-09 14:28:45 +0000
committerChristian Grothoff <christian@grothoff.org>2015-02-09 14:28:45 +0000
commit72a2c1b9542d68eab32f483a1c53eeec19bc12b3 (patch)
tree36fe4082af27fba371e51bb838d8a0435e032432 /src/transport/plugin_transport_wlan.c
parent6806f421c1164921cfa265ddc7009c08986bc915 (diff)
downloadgnunet-72a2c1b9542d68eab32f483a1c53eeec19bc12b3.tar.gz
gnunet-72a2c1b9542d68eab32f483a1c53eeec19bc12b3.zip
-do only send HELLO to clients once on startup, do only send fully initialized HELLO to clients if we can help it, even the first one; do not perform blacklist check twice for try_connect
Diffstat (limited to 'src/transport/plugin_transport_wlan.c')
-rw-r--r--src/transport/plugin_transport_wlan.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c
index a5a72e8cc..42b7d8669 100644
--- a/src/transport/plugin_transport_wlan.c
+++ b/src/transport/plugin_transport_wlan.c
@@ -1681,9 +1681,11 @@ send_hello_beacon (void *cls,
1681 const struct GNUNET_MessageHeader *hello; 1681 const struct GNUNET_MessageHeader *hello;
1682 1682
1683 hello = plugin->env->get_our_hello (); 1683 hello = plugin->env->get_our_hello ();
1684 hello_size = GNUNET_HELLO_size ((struct GNUNET_HELLO_Message *) hello); 1684 if (NULL != hello)
1685 GNUNET_assert (sizeof (struct WlanHeader) + hello_size <= WLAN_MTU); 1685 {
1686 size = sizeof (struct GNUNET_TRANSPORT_WLAN_RadiotapSendMessage) + hello_size; 1686 hello_size = GNUNET_HELLO_size ((struct GNUNET_HELLO_Message *) hello);
1687 GNUNET_assert (sizeof (struct WlanHeader) + hello_size <= WLAN_MTU);
1688 size = sizeof (struct GNUNET_TRANSPORT_WLAN_RadiotapSendMessage) + hello_size;
1687 { 1689 {
1688 char buf[size] GNUNET_ALIGN; 1690 char buf[size] GNUNET_ALIGN;
1689 1691
@@ -1706,7 +1708,7 @@ send_hello_beacon (void *cls,
1706 GNUNET_STATISTICS_update (plugin->env->stats, 1708 GNUNET_STATISTICS_update (plugin->env->stats,
1707 _("# HELLO beacons sent"), 1709 _("# HELLO beacons sent"),
1708 1, GNUNET_NO); 1710 1, GNUNET_NO);
1709 } 1711 } }
1710 plugin->beacon_task = 1712 plugin->beacon_task =
1711 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply 1713 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
1712 (HELLO_BEACON_SCALING_FACTOR, 1714 (HELLO_BEACON_SCALING_FACTOR,