summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-04-05 13:35:29 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-04-05 13:35:29 +0000
commit0eb4c43a7edec834ecff96dc3e7b43e2935e4b08 (patch)
tree753ec87f047b5160cf4c8cfc4717d6dd39f3b752 /src
parente4d67f259adee2cc76c788f0bc5afac616dfb1cb (diff)
refresh hello fix
Diffstat (limited to 'src')
-rw-r--r--src/transport/gnunet-service-transport_hello.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/transport/gnunet-service-transport_hello.c b/src/transport/gnunet-service-transport_hello.c
index d9f7e2e4e..8c8d7854f 100644
--- a/src/transport/gnunet-service-transport_hello.c
+++ b/src/transport/gnunet-service-transport_hello.c
@@ -161,17 +161,21 @@ static void
refresh_hello_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct GeneratorContext gc;
+ int friend_only;
hello_task = GNUNET_SCHEDULER_NO_TASK;
gc.addr_pos = oal_head;
gc.expiration = GNUNET_TIME_relative_to_absolute (hello_expiration);
+
+ friend_only = GNUNET_HELLO_is_friend_only (our_hello);
GNUNET_free (our_hello);
- our_hello = GNUNET_HELLO_create (&GST_my_public_key, &address_generator, &gc, GNUNET_NO);
+ our_hello = GNUNET_HELLO_create (&GST_my_public_key, &address_generator, &gc, friend_only);
GNUNET_assert (NULL != our_hello);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK,
- "Refreshed my `%s', new size is %d\n", "HELLO",
- GNUNET_HELLO_size (our_hello));
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Refreshed my %s `%s', new size is %d\n",
+ (GNUNET_YES == GNUNET_HELLO_is_friend_only (our_hello)) ? "friend-only" : "public",
+ "HELLO", GNUNET_HELLO_size (our_hello));
GNUNET_STATISTICS_update (GST_stats, gettext_noop ("# refreshed my HELLO"), 1,
GNUNET_NO);
if (NULL != hello_cb)