aboutsummaryrefslogtreecommitdiff
path: root/src/peerinfo
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-10-03 20:12:09 +0000
committerChristian Grothoff <christian@grothoff.org>2015-10-03 20:12:09 +0000
commit5baf12a487a19225962d15e28ba52f10d1d1f7d4 (patch)
tree59b511a23d38b57ef880e7171a46df6e90562893 /src/peerinfo
parentf7f85255bce69204e68b5fca21afae8ea4d6d352 (diff)
downloadgnunet-5baf12a487a19225962d15e28ba52f10d1d1f7d4.tar.gz
gnunet-5baf12a487a19225962d15e28ba52f10d1d1f7d4.zip
improving comments and coding style for libgnunethello library
Diffstat (limited to 'src/peerinfo')
-rw-r--r--src/peerinfo/gnunet-service-peerinfo.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/peerinfo/gnunet-service-peerinfo.c b/src/peerinfo/gnunet-service-peerinfo.c
index e6ba65e40..31ba3455e 100644
--- a/src/peerinfo/gnunet-service-peerinfo.c
+++ b/src/peerinfo/gnunet-service-peerinfo.c
@@ -700,7 +700,7 @@ update_friend_hello (const struct GNUNET_HELLO_Message *hello,
700{ 700{
701 struct GNUNET_HELLO_Message * res; 701 struct GNUNET_HELLO_Message * res;
702 struct GNUNET_HELLO_Message * tmp; 702 struct GNUNET_HELLO_Message * tmp;
703 struct GNUNET_CRYPTO_EddsaPublicKey pk; 703 struct GNUNET_PeerIdentity pid;
704 704
705 if (NULL != friend_hello) 705 if (NULL != friend_hello)
706 { 706 {
@@ -710,12 +710,15 @@ update_friend_hello (const struct GNUNET_HELLO_Message *hello,
710 } 710 }
711 711
712 if (GNUNET_OK != 712 if (GNUNET_OK !=
713 GNUNET_HELLO_get_key (hello, &pk)) 713 GNUNET_HELLO_get_id (hello, &pid))
714 { 714 {
715 GNUNET_break (0); 715 GNUNET_break (0);
716 return NULL; 716 return NULL;
717 } 717 }
718 tmp = GNUNET_HELLO_create (&pk, NULL, NULL, GNUNET_YES); 718 tmp = GNUNET_HELLO_create (&pid.public_key,
719 NULL,
720 NULL,
721 GNUNET_YES);
719 res = GNUNET_HELLO_merge (hello, tmp); 722 res = GNUNET_HELLO_merge (hello, tmp);
720 GNUNET_free (tmp); 723 GNUNET_free (tmp);
721 GNUNET_assert (GNUNET_YES == GNUNET_HELLO_is_friend_only (res)); 724 GNUNET_assert (GNUNET_YES == GNUNET_HELLO_is_friend_only (res));