summaryrefslogtreecommitdiff
path: root/src/hello/gnunet-hello.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hello/gnunet-hello.c')
-rw-r--r--src/hello/gnunet-hello.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/hello/gnunet-hello.c b/src/hello/gnunet-hello.c
index b6e197b65..2467f33a8 100644
--- a/src/hello/gnunet-hello.c
+++ b/src/hello/gnunet-hello.c
@@ -114,7 +114,7 @@ main (int argc, char *argv[])
114 struct GNUNET_DISK_FileHandle *fh; 114 struct GNUNET_DISK_FileHandle *fh;
115 struct GNUNET_HELLO_Message *orig; 115 struct GNUNET_HELLO_Message *orig;
116 struct GNUNET_HELLO_Message *result; 116 struct GNUNET_HELLO_Message *result;
117 struct GNUNET_CRYPTO_EddsaPublicKey pk; 117 struct GNUNET_PeerIdentity pid;
118 uint64_t fsize; 118 uint64_t fsize;
119 address_count = 0; 119 address_count = 0;
120 120
@@ -167,7 +167,8 @@ main (int argc, char *argv[])
167 GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_close (fh)); 167 GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_close (fh));
168 orig = (struct GNUNET_HELLO_Message *) buf; 168 orig = (struct GNUNET_HELLO_Message *) buf;
169 if ( (fsize != GNUNET_HELLO_size (orig)) || 169 if ( (fsize != GNUNET_HELLO_size (orig)) ||
170 (GNUNET_OK != GNUNET_HELLO_get_key (orig, &pk)) ) 170 (GNUNET_OK != GNUNET_HELLO_get_id (orig,
171 &pid)) )
171 { 172 {
172 FPRINTF (stderr, 173 FPRINTF (stderr,
173 _("Did not find well-formed HELLO in file `%s'\n"), 174 _("Did not find well-formed HELLO in file `%s'\n"),
@@ -175,15 +176,16 @@ main (int argc, char *argv[])
175 return 1; 176 return 1;
176 } 177 }
177 { 178 {
178 char *pid; 179 char *pids;
179 180
180 pid = GNUNET_CRYPTO_eddsa_public_key_to_string (&pk); 181 pids = GNUNET_CRYPTO_eddsa_public_key_to_string (&pid.public_key);
181 fprintf (stdout, 182 fprintf (stdout,
182 "Processing HELLO for peer `%s'\n", 183 "Processing HELLO for peer `%s'\n",
183 pid); 184 pids);
184 GNUNET_free (pid); 185 GNUNET_free (pids);
185 } 186 }
186 result = GNUNET_HELLO_create (&pk, &add_from_hello, 187 result = GNUNET_HELLO_create (&pid.public_key,
188 &add_from_hello,
187 &orig, 189 &orig,
188 GNUNET_HELLO_is_friend_only (orig)); 190 GNUNET_HELLO_is_friend_only (orig));
189 GNUNET_assert (NULL != result); 191 GNUNET_assert (NULL != result);