[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r33745 - gnunet/src/hello
From: |
gnunet |
Subject: |
[GNUnet-SVN] r33745 - gnunet/src/hello |
Date: |
Sun, 22 Jun 2014 16:05:29 +0200 |
Author: grothoff
Date: 2014-06-22 16:05:29 +0200 (Sun, 22 Jun 2014)
New Revision: 33745
Modified:
gnunet/src/hello/gnunet-hello.c
Log:
output public key of peer
Modified: gnunet/src/hello/gnunet-hello.c
===================================================================
--- gnunet/src/hello/gnunet-hello.c 2014-06-22 14:05:17 UTC (rev 33744)
+++ gnunet/src/hello/gnunet-hello.c 2014-06-22 14:05:29 UTC (rev 33745)
@@ -56,10 +56,11 @@
* @param cls closure
* @param address address to add
* @param expiration old expiration
- * @return GNUNET_OK keep iterating
+ * @return #GNUNET_OK keep iterating
*/
static int
-add_to_buf (void *cls, const struct GNUNET_HELLO_Address *address,
+add_to_buf (void *cls,
+ const struct GNUNET_HELLO_Address *address,
struct GNUNET_TIME_Absolute expiration)
{
struct AddContext *ac = cls;
@@ -86,7 +87,9 @@
* @return number of bytes added, 0 to terminate
*/
static ssize_t
-add_from_hello (void *cls, size_t max, void *buf)
+add_from_hello (void *cls,
+ size_t max,
+ void *buf)
{
struct GNUNET_HELLO_Message **orig = cls;
struct AddContext ac;
@@ -171,8 +174,18 @@
argv[1]);
return 1;
}
- result = GNUNET_HELLO_create (&pk, &add_from_hello, &orig,
- GNUNET_HELLO_is_friend_only (orig));
+ {
+ char *pid;
+
+ pid = GNUNET_CRYPTO_eddsa_public_key_to_string (&pk);
+ fprintf (stdout,
+ "Processing HELLO for peer `%s'\n",
+ pid);
+ GNUNET_free (pid);
+ }
+ result = GNUNET_HELLO_create (&pk, &add_from_hello,
+ &orig,
+ GNUNET_HELLO_is_friend_only (orig));
GNUNET_assert (NULL != result);
fh = GNUNET_DISK_file_open (argv[1],
GNUNET_DISK_OPEN_WRITE,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r33745 - gnunet/src/hello,
gnunet <=