summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-02-12 19:13:46 +0000
committerChristian Grothoff <christian@grothoff.org>2015-02-12 19:13:46 +0000
commite5f8178881e8fa8af23574b8303f0396f79c0834 (patch)
tree902abb0292eced697d11f880142926b9451ad2e6 /src
parent434c9f5673737753ddfb882d616465b22c5fb027 (diff)
generate our own HELLO before starting validations
Diffstat (limited to 'src')
-rw-r--r--src/transport/gnunet-service-transport.c6
-rw-r--r--src/transport/gnunet-service-transport_hello.c5
-rw-r--r--src/transport/gnunet-service-transport_validation.c8
3 files changed, 6 insertions, 13 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index 60f942d91..46503a5bf 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -1013,9 +1013,6 @@ run (void *cls,
if (GNUNET_SYSERR == friend_only)
friend_only = GNUNET_NO; /* According to topology defaults */
/* start subsystems */
- GST_hello_start (friend_only,
- &process_hello_update,
- NULL);
GST_blacklist_start (GST_server,
GST_cfg,
&GST_my_identity);
@@ -1030,6 +1027,9 @@ run (void *cls,
&plugin_env_address_change_notification,
&plugin_env_session_start,
&plugin_env_session_end);
+ GST_hello_start (friend_only,
+ &process_hello_update,
+ NULL);
GST_neighbours_start ((max_fd / 3) * 2);
GST_clients_start (GST_server);
GST_validation_start ((max_fd / 3));
diff --git a/src/transport/gnunet-service-transport_hello.c b/src/transport/gnunet-service-transport_hello.c
index 7b5f79a4a..7ed5c1e04 100644
--- a/src/transport/gnunet-service-transport_hello.c
+++ b/src/transport/gnunet-service-transport_hello.c
@@ -112,7 +112,7 @@ static int friend_option;
/**
* Identifier of #refresh_hello_task().
*/
-static struct GNUNET_SCHEDULER_Task * hello_task;
+static struct GNUNET_SCHEDULER_Task *hello_task;
/**
@@ -180,7 +180,6 @@ refresh_hello_task (void *cls,
&address_generator,
&gc,
friend_option);
- GNUNET_assert (NULL != our_hello);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Refreshed my %s HELLO, new size is %d\n",
(GNUNET_YES == friend_option) ? "friend-only" : "public",
@@ -232,7 +231,7 @@ GST_hello_start (int friend_only,
hello_cb = cb;
hello_cb_cls = cb_cls;
friend_option = friend_only;
- refresh_hello ();
+ refresh_hello_task (NULL, NULL);
}
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c
index cdb2fb63b..323fd042a 100644
--- a/src/transport/gnunet-service-transport_validation.c
+++ b/src/transport/gnunet-service-transport_validation.c
@@ -541,13 +541,7 @@ transmit_ping_if_allowed (void *cls,
return;
}
hello = GST_hello_get ();
- if (NULL == hello)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Not PINGing peer `%s' as our HELLO is not yet ready\n",
- GNUNET_i2s (pid));
- return;
- }
+ GNUNET_assert (NULL != hello);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Transmitting plain PING to `%s' `%s' `%s'\n",
GNUNET_i2s (pid),