diff options
Diffstat (limited to 'src/transport/gnunet-service-transport.c')
-rw-r--r-- | src/transport/gnunet-service-transport.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 336925f4f..65519914a 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c | |||
@@ -215,6 +215,11 @@ transmit_our_hello (void *cls, | |||
215 | { | 215 | { |
216 | const struct GNUNET_MessageHeader *hello = cls; | 216 | const struct GNUNET_MessageHeader *hello = cls; |
217 | 217 | ||
218 | if (0 == | ||
219 | memcmp (peer, | ||
220 | &GST_my_identity, | ||
221 | sizeof (struct GNUNET_PeerIdentity))) | ||
222 | return; /* not to ourselves */ | ||
218 | if (GNUNET_NO == GST_neighbours_test_connected (peer)) | 223 | if (GNUNET_NO == GST_neighbours_test_connected (peer)) |
219 | return; | 224 | return; |
220 | 225 | ||
@@ -236,8 +241,13 @@ static void | |||
236 | process_hello_update (void *cls, | 241 | process_hello_update (void *cls, |
237 | const struct GNUNET_MessageHeader *hello) | 242 | const struct GNUNET_MessageHeader *hello) |
238 | { | 243 | { |
244 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
245 | "Broadcasting HELLO to clients\n"); | ||
239 | GST_clients_broadcast (hello, GNUNET_NO); | 246 | GST_clients_broadcast (hello, GNUNET_NO); |
240 | GST_neighbours_iterate (&transmit_our_hello, (void *) hello); | 247 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
248 | "Broadcasting HELLO to neighbours\n"); | ||
249 | GST_neighbours_iterate (&transmit_our_hello, | ||
250 | (void *) hello); | ||
241 | } | 251 | } |
242 | 252 | ||
243 | 253 | ||
@@ -1051,14 +1061,18 @@ run (void *cls, | |||
1051 | "Limiting number of sockets to %u: validation %u, neighbors: %u\n", | 1061 | "Limiting number of sockets to %u: validation %u, neighbors: %u\n", |
1052 | max_fd, (max_fd / 3), (max_fd / 3) * 2); | 1062 | max_fd, (max_fd / 3), (max_fd / 3) * 2); |
1053 | 1063 | ||
1054 | friend_only = GNUNET_CONFIGURATION_get_value_yesno (GST_cfg, "topology", | 1064 | friend_only = GNUNET_CONFIGURATION_get_value_yesno (GST_cfg, |
1055 | "FRIENDS-ONLY"); | 1065 | "topology", |
1066 | "FRIENDS-ONLY"); | ||
1056 | if (GNUNET_SYSERR == friend_only) | 1067 | if (GNUNET_SYSERR == friend_only) |
1057 | friend_only = GNUNET_NO; /* According to topology defaults */ | 1068 | friend_only = GNUNET_NO; /* According to topology defaults */ |
1058 | /* start subsystems */ | 1069 | /* start subsystems */ |
1059 | GST_hello_start (friend_only, &process_hello_update, NULL ); | 1070 | GST_hello_start (friend_only, |
1060 | GNUNET_assert(NULL != GST_hello_get()); | 1071 | &process_hello_update, |
1061 | GST_blacklist_start (GST_server, GST_cfg, &GST_my_identity); | 1072 | NULL); |
1073 | GST_blacklist_start (GST_server, | ||
1074 | GST_cfg, | ||
1075 | &GST_my_identity); | ||
1062 | is = GNUNET_ATS_scanner_init (); | 1076 | is = GNUNET_ATS_scanner_init (); |
1063 | GST_ats_connect = GNUNET_ATS_connectivity_init (GST_cfg); | 1077 | GST_ats_connect = GNUNET_ATS_connectivity_init (GST_cfg); |
1064 | GST_ats = GNUNET_ATS_scheduling_init (GST_cfg, | 1078 | GST_ats = GNUNET_ATS_scheduling_init (GST_cfg, |