gnunet

Main GNUnet Logic
Log | Files | Refs | Submodules | README | LICENSE

commit 73b0aa3d9b66f2a9f08f9a75b36a4d993ca8a2c8
parent db0ea05dd78b11caf79067746252161905630e2c
Author: Christian Grothoff <christian@grothoff.org>
Date:   Tue,  1 Oct 2013 06:52:03 +0000

-fix test FTBFS

Diffstat:
Msrc/peerinfo/perf_peerinfo_api.c | 6++----
Msrc/peerinfo/test_peerinfo_api.c | 6++----
Msrc/peerinfo/test_peerinfo_api_friend_only.c | 6++----
Msrc/peerinfo/test_peerinfo_api_notify_friend_only.c | 6++----
4 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/src/peerinfo/perf_peerinfo_api.c b/src/peerinfo/perf_peerinfo_api.c @@ -82,12 +82,10 @@ address_generator (void *cls, size_t max, void *buf) static void add_peer (size_t i) { - struct GNUNET_CRYPTO_EccPublicSignKey pkey; struct GNUNET_HELLO_Message *h2; - memset (&pkey, i, sizeof (pkey)); - GNUNET_CRYPTO_hash (&pkey, sizeof (pkey), &pid.hashPubKey); - h2 = GNUNET_HELLO_create (&pkey, &address_generator, &i, GNUNET_NO); + memset (&pid, i, sizeof (pid)); + h2 = GNUNET_HELLO_create (&pid.public_key, &address_generator, &i, GNUNET_NO); GNUNET_PEERINFO_add_peer (h, h2, NULL, NULL); GNUNET_free (h2); } diff --git a/src/peerinfo/test_peerinfo_api.c b/src/peerinfo/test_peerinfo_api.c @@ -86,14 +86,12 @@ struct GNUNET_PeerIdentity pid; static void add_peer () { - struct GNUNET_CRYPTO_EccPublicSignKey pkey; struct GNUNET_HELLO_Message *h2; size_t agc; agc = 2; - memset (&pkey, 32, sizeof (pkey)); - GNUNET_CRYPTO_hash (&pkey, sizeof (pkey), &pid.hashPubKey); - h2 = GNUNET_HELLO_create (&pkey, &address_generator, &agc, GNUNET_NO); + memset (&pid, 32, sizeof (pid)); + h2 = GNUNET_HELLO_create (&pid.public_key, &address_generator, &agc, GNUNET_NO); GNUNET_PEERINFO_add_peer (h, h2, NULL, NULL); GNUNET_free (h2); diff --git a/src/peerinfo/test_peerinfo_api_friend_only.c b/src/peerinfo/test_peerinfo_api_friend_only.c @@ -68,14 +68,12 @@ struct GNUNET_PeerIdentity pid; static void add_peer () { - struct GNUNET_CRYPTO_EccPublicSignKey pkey; struct GNUNET_HELLO_Message *h2; size_t agc; agc = 2; - memset (&pkey, 32, sizeof (pkey)); - GNUNET_CRYPTO_hash (&pkey, sizeof (pkey), &pid.hashPubKey); - h2 = GNUNET_HELLO_create (&pkey, &address_generator, &agc, GNUNET_YES); + memset (&pid, 32, sizeof (pid)); + h2 = GNUNET_HELLO_create (&pid.public_key, &address_generator, &agc, GNUNET_YES); GNUNET_PEERINFO_add_peer (h, h2, NULL, NULL); GNUNET_free (h2); diff --git a/src/peerinfo/test_peerinfo_api_notify_friend_only.c b/src/peerinfo/test_peerinfo_api_notify_friend_only.c @@ -227,14 +227,12 @@ add_peer_done (void *cls, const char *emsg) static void add_peer () { - struct GNUNET_CRYPTO_EccPublicSignKey pkey; struct GNUNET_HELLO_Message *h2; size_t agc; agc = 2; - memset (&pkey, 32, sizeof (pkey)); - GNUNET_CRYPTO_hash (&pkey, sizeof (pkey), &pid.hashPubKey); - h2 = GNUNET_HELLO_create (&pkey, &address_generator, &agc, GNUNET_YES); + memset (&pid, 32, sizeof (pid)); + h2 = GNUNET_HELLO_create (&pid.public_key, &address_generator, &agc, GNUNET_YES); GNUNET_PEERINFO_add_peer (h, h2, &add_peer_done, NULL); GNUNET_free (h2);