aboutsummaryrefslogtreecommitdiff
path: root/src/transport
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/transport
parent434c9f5673737753ddfb882d616465b22c5fb027 (diff)
downloadgnunet-e5f8178881e8fa8af23574b8303f0396f79c0834.tar.gz
gnunet-e5f8178881e8fa8af23574b8303f0396f79c0834.zip
generate our own HELLO before starting validations
Diffstat (limited to 'src/transport')
-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,
1013 if (GNUNET_SYSERR == friend_only) 1013 if (GNUNET_SYSERR == friend_only)
1014 friend_only = GNUNET_NO; /* According to topology defaults */ 1014 friend_only = GNUNET_NO; /* According to topology defaults */
1015 /* start subsystems */ 1015 /* start subsystems */
1016 GST_hello_start (friend_only,
1017 &process_hello_update,
1018 NULL);
1019 GST_blacklist_start (GST_server, 1016 GST_blacklist_start (GST_server,
1020 GST_cfg, 1017 GST_cfg,
1021 &GST_my_identity); 1018 &GST_my_identity);
@@ -1030,6 +1027,9 @@ run (void *cls,
1030 &plugin_env_address_change_notification, 1027 &plugin_env_address_change_notification,
1031 &plugin_env_session_start, 1028 &plugin_env_session_start,
1032 &plugin_env_session_end); 1029 &plugin_env_session_end);
1030 GST_hello_start (friend_only,
1031 &process_hello_update,
1032 NULL);
1033 GST_neighbours_start ((max_fd / 3) * 2); 1033 GST_neighbours_start ((max_fd / 3) * 2);
1034 GST_clients_start (GST_server); 1034 GST_clients_start (GST_server);
1035 GST_validation_start ((max_fd / 3)); 1035 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;
112/** 112/**
113 * Identifier of #refresh_hello_task(). 113 * Identifier of #refresh_hello_task().
114 */ 114 */
115static struct GNUNET_SCHEDULER_Task * hello_task; 115static struct GNUNET_SCHEDULER_Task *hello_task;
116 116
117 117
118/** 118/**
@@ -180,7 +180,6 @@ refresh_hello_task (void *cls,
180 &address_generator, 180 &address_generator,
181 &gc, 181 &gc,
182 friend_option); 182 friend_option);
183 GNUNET_assert (NULL != our_hello);
184 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 183 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
185 "Refreshed my %s HELLO, new size is %d\n", 184 "Refreshed my %s HELLO, new size is %d\n",
186 (GNUNET_YES == friend_option) ? "friend-only" : "public", 185 (GNUNET_YES == friend_option) ? "friend-only" : "public",
@@ -232,7 +231,7 @@ GST_hello_start (int friend_only,
232 hello_cb = cb; 231 hello_cb = cb;
233 hello_cb_cls = cb_cls; 232 hello_cb_cls = cb_cls;
234 friend_option = friend_only; 233 friend_option = friend_only;
235 refresh_hello (); 234 refresh_hello_task (NULL, NULL);
236} 235}
237 236
238 237
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,
541 return; 541 return;
542 } 542 }
543 hello = GST_hello_get (); 543 hello = GST_hello_get ();
544 if (NULL == hello) 544 GNUNET_assert (NULL != hello);
545 {
546 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
547 "Not PINGing peer `%s' as our HELLO is not yet ready\n",
548 GNUNET_i2s (pid));
549 return;
550 }
551 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 545 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
552 "Transmitting plain PING to `%s' `%s' `%s'\n", 546 "Transmitting plain PING to `%s' `%s' `%s'\n",
553 GNUNET_i2s (pid), 547 GNUNET_i2s (pid),