aboutsummaryrefslogtreecommitdiff
path: root/src/hello/hello.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hello/hello.c')
-rw-r--r--src/hello/hello.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/hello/hello.c b/src/hello/hello.c
index 53003e296..9e246d473 100644
--- a/src/hello/hello.c
+++ b/src/hello/hello.c
@@ -296,9 +296,7 @@ GNUNET_HELLO_iterate_addresses (const struct GNUNET_HELLO_Message *msg,
296 insize = msize - sizeof (struct GNUNET_HELLO_Message); 296 insize = msize - sizeof (struct GNUNET_HELLO_Message);
297 wpos = 0; 297 wpos = 0;
298 woff = (ret != NULL) ? (char *) &ret[1] : NULL; 298 woff = (ret != NULL) ? (char *) &ret[1] : NULL;
299 GNUNET_CRYPTO_hash (&msg->publicKey, 299 address.peer.public_key = msg->publicKey;
300 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey),
301 &address.peer.hashPubKey);
302 while (insize > 0) 300 while (insize > 0)
303 { 301 {
304 esize = get_hello_address_size (inptr, insize, &alen); 302 esize = get_hello_address_size (inptr, insize, &alen);
@@ -549,7 +547,7 @@ GNUNET_HELLO_get_key (const struct GNUNET_HELLO_Message *hello,
549 * 547 *
550 * @param hello the hello message 548 * @param hello the hello message
551 * @param peer where to store the peer's identity 549 * @param peer where to store the peer's identity
552 * @return GNUNET_SYSERR if the HELLO was malformed 550 * @return #GNUNET_SYSERR if the HELLO was malformed
553 */ 551 */
554int 552int
555GNUNET_HELLO_get_id (const struct GNUNET_HELLO_Message *hello, 553GNUNET_HELLO_get_id (const struct GNUNET_HELLO_Message *hello,
@@ -560,9 +558,7 @@ GNUNET_HELLO_get_id (const struct GNUNET_HELLO_Message *hello,
560 if ((ret < sizeof (struct GNUNET_HELLO_Message)) || 558 if ((ret < sizeof (struct GNUNET_HELLO_Message)) ||
561 (ntohs (hello->header.type) != GNUNET_MESSAGE_TYPE_HELLO)) 559 (ntohs (hello->header.type) != GNUNET_MESSAGE_TYPE_HELLO))
562 return GNUNET_SYSERR; 560 return GNUNET_SYSERR;
563 GNUNET_CRYPTO_hash (&hello->publicKey, 561 peer->public_key = hello->publicKey;
564 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey),
565 &peer->hashPubKey);
566 return GNUNET_OK; 562 return GNUNET_OK;
567} 563}
568 564