aboutsummaryrefslogtreecommitdiff
path: root/src/hello/gnunet-hello.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-03-28 15:14:38 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-03-28 15:14:38 +0000
commitb3883971cd31d198dbd768fffb15960dff0352a6 (patch)
tree1803032b911774f57158013eedfc26a3c0fb5462 /src/hello/gnunet-hello.c
parent1fe395444d868f4fd66d44da83cb61a69acc6b66 (diff)
downloadgnunet-b3883971cd31d198dbd768fffb15960dff0352a6.tar.gz
gnunet-b3883971cd31d198dbd768fffb15960dff0352a6.zip
new friend only HELLO type GNUNET_MESSAGE_TYPE_FRIEND_HELLO
Diffstat (limited to 'src/hello/gnunet-hello.c')
-rw-r--r--src/hello/gnunet-hello.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/hello/gnunet-hello.c b/src/hello/gnunet-hello.c
index fa250d7a1..7df8b7b83 100644
--- a/src/hello/gnunet-hello.c
+++ b/src/hello/gnunet-hello.c
@@ -23,6 +23,7 @@
23 * @author Christian Grothoff 23 * @author Christian Grothoff
24 */ 24 */
25#include "platform.h" 25#include "platform.h"
26#include "gnunet_protocols.h"
26#include "gnunet_hello_lib.h" 27#include "gnunet_hello_lib.h"
27 28
28/** 29/**
@@ -109,6 +110,7 @@ main (int argc, char *argv[])
109 struct GNUNET_HELLO_Message *result; 110 struct GNUNET_HELLO_Message *result;
110 struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pk; 111 struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pk;
111 uint64_t fsize; 112 uint64_t fsize;
113 int friend_only;
112 114
113 GNUNET_log_setup ("gnunet-hello", "INFO", NULL); 115 GNUNET_log_setup ("gnunet-hello", "INFO", NULL);
114 if (argc != 2) 116 if (argc != 2)
@@ -166,7 +168,12 @@ main (int argc, char *argv[])
166 argv[1]); 168 argv[1]);
167 return 1; 169 return 1;
168 } 170 }
169 result = GNUNET_HELLO_create (&pk, &add_from_hello, &orig); 171 friend_only = GNUNET_NO;
172 if (GNUNET_MESSAGE_TYPE_HELLO == GNUNET_HELLO_get_type ((struct GNUNET_MessageHeader *) orig))
173 friend_only = GNUNET_NO;
174 if (GNUNET_MESSAGE_TYPE_FRIEND_HELLO == GNUNET_HELLO_get_type ((struct GNUNET_MessageHeader *) orig))
175 friend_only = GNUNET_YES;
176 result = GNUNET_HELLO_create (&pk, &add_from_hello, &orig, friend_only);
170 GNUNET_assert (NULL != result); 177 GNUNET_assert (NULL != result);
171 fh = GNUNET_DISK_file_open (argv[1], 178 fh = GNUNET_DISK_file_open (argv[1],
172 GNUNET_DISK_OPEN_WRITE, 179 GNUNET_DISK_OPEN_WRITE,