diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-03-28 15:43:23 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-03-28 15:43:23 +0000 |
commit | 91140caa33349036934b5b86238c0ec6265e0a13 (patch) | |
tree | 7340da5a8452a12588be643e59458f2f0a6891e1 /src/transport/gnunet-service-transport.c | |
parent | a55b2de0863937cfe9c0fcbf41882b81f4c82c9c (diff) | |
download | gnunet-91140caa33349036934b5b86238c0ec6265e0a13.tar.gz gnunet-91140caa33349036934b5b86238c0ec6265e0a13.zip |
support for FRIEND_HELLO messages
Diffstat (limited to 'src/transport/gnunet-service-transport.c')
-rw-r--r-- | src/transport/gnunet-service-transport.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index be0371a6a..63b2ced88 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c | |||
@@ -242,6 +242,7 @@ GST_receive_callback (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
242 | switch (type) | 242 | switch (type) |
243 | { | 243 | { |
244 | case GNUNET_MESSAGE_TYPE_HELLO: | 244 | case GNUNET_MESSAGE_TYPE_HELLO: |
245 | case GNUNET_MESSAGE_TYPE_FRIEND_HELLO: | ||
245 | GST_validation_handle_hello (message); | 246 | GST_validation_handle_hello (message); |
246 | return ret; | 247 | return ret; |
247 | case GNUNET_MESSAGE_TYPE_TRANSPORT_PING: | 248 | case GNUNET_MESSAGE_TYPE_TRANSPORT_PING: |
@@ -630,6 +631,7 @@ key_generation_cb (void *cls, | |||
630 | long long unsigned int max_fd_cfg; | 631 | long long unsigned int max_fd_cfg; |
631 | int max_fd_rlimit; | 632 | int max_fd_rlimit; |
632 | int max_fd; | 633 | int max_fd; |
634 | int friend_only; | ||
633 | 635 | ||
634 | GST_keygen = NULL; | 636 | GST_keygen = NULL; |
635 | if (NULL == pk) | 637 | if (NULL == pk) |
@@ -686,8 +688,11 @@ key_generation_cb (void *cls, | |||
686 | "Limiting number of sockets to %u: validation %u, neighbors: %u\n", | 688 | "Limiting number of sockets to %u: validation %u, neighbors: %u\n", |
687 | max_fd, (max_fd / 3) , (max_fd / 3) * 2); | 689 | max_fd, (max_fd / 3) , (max_fd / 3) * 2); |
688 | 690 | ||
691 | friend_only = GNUNET_CONFIGURATION_get_value_yesno(GST_cfg, "topology","FRIENDS-ONLY"); | ||
692 | if (GNUNET_SYSERR == friend_only) | ||
693 | friend_only = GNUNET_NO; /* According to topology defaults */ | ||
689 | /* start subsystems */ | 694 | /* start subsystems */ |
690 | GST_hello_start (&process_hello_update, NULL); | 695 | GST_hello_start (friend_only, &process_hello_update, NULL); |
691 | GNUNET_assert (NULL != GST_hello_get()); | 696 | GNUNET_assert (NULL != GST_hello_get()); |
692 | GST_blacklist_start (GST_server, GST_cfg, &GST_my_identity); | 697 | GST_blacklist_start (GST_server, GST_cfg, &GST_my_identity); |
693 | GST_ats = | 698 | GST_ats = |