diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-02-10 15:12:12 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-02-10 15:12:12 +0000 |
commit | 2d5e52d4afd381a776a6ee5da5c80255e47ed9fc (patch) | |
tree | 6de277ee5546f1e27ee4f1cd2f333dc10739b02b /src | |
parent | 3920dcf68906586ed2677c0ac6fde6e532d96d7d (diff) | |
download | gnunet-2d5e52d4afd381a776a6ee5da5c80255e47ed9fc.tar.gz gnunet-2d5e52d4afd381a776a6ee5da5c80255e47ed9fc.zip |
fix
Diffstat (limited to 'src')
-rw-r--r-- | src/core/gnunet-service-core.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c index 59573525b..fa9b00da7 100644 --- a/src/core/gnunet-service-core.c +++ b/src/core/gnunet-service-core.c | |||
@@ -2342,6 +2342,15 @@ handle_set_key (struct Neighbour *n, const struct SetKeyMessage *m) | |||
2342 | #endif | 2342 | #endif |
2343 | if (n->public_key == NULL) | 2343 | if (n->public_key == NULL) |
2344 | { | 2344 | { |
2345 | if (n->pitr != NULL) | ||
2346 | { | ||
2347 | #if DEBUG_CORE | ||
2348 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
2349 | "Ignoring `%s' message due to lack of public key for peer (still trying to obtain one).\n", | ||
2350 | "SET_KEY"); | ||
2351 | #endif | ||
2352 | return; | ||
2353 | } | ||
2345 | #if DEBUG_CORE | 2354 | #if DEBUG_CORE |
2346 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2355 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2347 | "Lacking public key for peer, trying to obtain one (handle_set_key).\n"); | 2356 | "Lacking public key for peer, trying to obtain one (handle_set_key).\n"); |
@@ -2349,7 +2358,6 @@ handle_set_key (struct Neighbour *n, const struct SetKeyMessage *m) | |||
2349 | m_cpy = GNUNET_malloc (sizeof (struct SetKeyMessage)); | 2358 | m_cpy = GNUNET_malloc (sizeof (struct SetKeyMessage)); |
2350 | memcpy (m_cpy, m, sizeof (struct SetKeyMessage)); | 2359 | memcpy (m_cpy, m, sizeof (struct SetKeyMessage)); |
2351 | /* lookup n's public key, then try again */ | 2360 | /* lookup n's public key, then try again */ |
2352 | GNUNET_assert (n->pitr == NULL); | ||
2353 | GNUNET_assert (n->skm == NULL); | 2361 | GNUNET_assert (n->skm == NULL); |
2354 | n->skm = m_cpy; | 2362 | n->skm = m_cpy; |
2355 | n->pitr = GNUNET_PEERINFO_iterate (cfg, | 2363 | n->pitr = GNUNET_PEERINFO_iterate (cfg, |