From 662188ec6b6726338b1aba1480521c211a197b6a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 17 Feb 2010 21:48:52 +0000 Subject: fix NPE, fixing HELLO timeout increment on HELLO transmission failure --- src/topology/gnunet-daemon-topology.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/topology') diff --git a/src/topology/gnunet-daemon-topology.c b/src/topology/gnunet-daemon-topology.c index 30ad925a7..6ae4d8210 100644 --- a/src/topology/gnunet-daemon-topology.c +++ b/src/topology/gnunet-daemon-topology.c @@ -910,6 +910,8 @@ process_peer (void *cls, } consider_for_advertising (hello); pos = find_peer (peer); + if (pos == NULL) + pos = make_peer (peer, hello, GNUNET_NO); GNUNET_assert (NULL != pos); #if DEBUG_TOPOLOGY GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, @@ -1213,7 +1215,6 @@ hello_advertising_ready (void *cls, memcpy (buf, pos->hello, want); GNUNET_CONTAINER_bloomfilter_add (pos->filter, &pl->id.hashPubKey); - pl->next_hello_allowed = GNUNET_TIME_relative_to_absolute (HELLO_ADVERTISEMENT_MIN_FREQUENCY); #if DEBUG_TOPOLOGY GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending %u bytes of `%s's", @@ -1222,6 +1223,7 @@ hello_advertising_ready (void *cls, #endif } } + pl->next_hello_allowed = GNUNET_TIME_relative_to_absolute (HELLO_ADVERTISEMENT_MIN_FREQUENCY); pl->hello_delay_task = GNUNET_SCHEDULER_add_now (sched, &schedule_next_hello, -- cgit v1.2.3