diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-02-17 21:48:52 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-02-17 21:48:52 +0000 |
commit | 662188ec6b6726338b1aba1480521c211a197b6a (patch) | |
tree | 04ae518cd8966fcf0482aa3653c3497bd9ac192e /src/topology | |
parent | 2b40fee5ed3b3ea4a12f7e2e4ad800f430c7c2f2 (diff) | |
download | gnunet-662188ec6b6726338b1aba1480521c211a197b6a.tar.gz gnunet-662188ec6b6726338b1aba1480521c211a197b6a.zip |
fix NPE, fixing HELLO timeout increment on HELLO transmission failure
Diffstat (limited to 'src/topology')
-rw-r--r-- | src/topology/gnunet-daemon-topology.c | 4 |
1 files changed, 3 insertions, 1 deletions
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, | |||
910 | } | 910 | } |
911 | consider_for_advertising (hello); | 911 | consider_for_advertising (hello); |
912 | pos = find_peer (peer); | 912 | pos = find_peer (peer); |
913 | if (pos == NULL) | ||
914 | pos = make_peer (peer, hello, GNUNET_NO); | ||
913 | GNUNET_assert (NULL != pos); | 915 | GNUNET_assert (NULL != pos); |
914 | #if DEBUG_TOPOLOGY | 916 | #if DEBUG_TOPOLOGY |
915 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 917 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -1213,7 +1215,6 @@ hello_advertising_ready (void *cls, | |||
1213 | memcpy (buf, pos->hello, want); | 1215 | memcpy (buf, pos->hello, want); |
1214 | GNUNET_CONTAINER_bloomfilter_add (pos->filter, | 1216 | GNUNET_CONTAINER_bloomfilter_add (pos->filter, |
1215 | &pl->id.hashPubKey); | 1217 | &pl->id.hashPubKey); |
1216 | pl->next_hello_allowed = GNUNET_TIME_relative_to_absolute (HELLO_ADVERTISEMENT_MIN_FREQUENCY); | ||
1217 | #if DEBUG_TOPOLOGY | 1218 | #if DEBUG_TOPOLOGY |
1218 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1219 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1219 | "Sending %u bytes of `%s's", | 1220 | "Sending %u bytes of `%s's", |
@@ -1222,6 +1223,7 @@ hello_advertising_ready (void *cls, | |||
1222 | #endif | 1223 | #endif |
1223 | } | 1224 | } |
1224 | } | 1225 | } |
1226 | pl->next_hello_allowed = GNUNET_TIME_relative_to_absolute (HELLO_ADVERTISEMENT_MIN_FREQUENCY); | ||
1225 | pl->hello_delay_task | 1227 | pl->hello_delay_task |
1226 | = GNUNET_SCHEDULER_add_now (sched, | 1228 | = GNUNET_SCHEDULER_add_now (sched, |
1227 | &schedule_next_hello, | 1229 | &schedule_next_hello, |