aboutsummaryrefslogtreecommitdiff
path: root/src/peerinfo-tool/gnunet-peerinfo.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-10-06 20:55:28 +0000
committerChristian Grothoff <christian@grothoff.org>2013-10-06 20:55:28 +0000
commit61c39c60565b386e0e12ea669556b030e8cd7180 (patch)
tree59109aeab8297bdc996faca8c4e38ec7426c36cf /src/peerinfo-tool/gnunet-peerinfo.c
parent780eb09dd8040ecf8649d40ddf8314464e0fc48e (diff)
downloadgnunet-61c39c60565b386e0e12ea669556b030e8cd7180.tar.gz
gnunet-61c39c60565b386e0e12ea669556b030e8cd7180.zip
-remove trailing whitespace
Diffstat (limited to 'src/peerinfo-tool/gnunet-peerinfo.c')
-rw-r--r--src/peerinfo-tool/gnunet-peerinfo.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/peerinfo-tool/gnunet-peerinfo.c b/src/peerinfo-tool/gnunet-peerinfo.c
index af7a8f757..67aeddbe7 100644
--- a/src/peerinfo-tool/gnunet-peerinfo.c
+++ b/src/peerinfo-tool/gnunet-peerinfo.c
@@ -62,7 +62,7 @@ struct AddressRecord
62 * Printable address. 62 * Printable address.
63 */ 63 */
64 char *result; 64 char *result;
65 65
66 /** 66 /**
67 * Print context this address record belongs to. 67 * Print context this address record belongs to.
68 */ 68 */
@@ -90,7 +90,7 @@ struct PrintContext
90 * Identity of the peer. 90 * Identity of the peer.
91 */ 91 */
92 struct GNUNET_PeerIdentity peer; 92 struct GNUNET_PeerIdentity peer;
93 93
94 /** 94 /**
95 * List of printable addresses. 95 * List of printable addresses.
96 */ 96 */
@@ -140,7 +140,7 @@ static int include_friend_only;
140static int get_self; 140static int get_self;
141 141
142/** 142/**
143 * Option 143 * Option
144 */ 144 */
145static int get_uri; 145static int get_uri;
146 146
@@ -155,7 +155,7 @@ static int default_operation;
155static int get_info; 155static int get_info;
156 156
157/** 157/**
158 * Option 158 * Option
159 */ 159 */
160static char *put_uri; 160static char *put_uri;
161 161
@@ -248,7 +248,7 @@ dump_pc (struct PrintContext *pc)
248 GNUNET_free (pc); 248 GNUNET_free (pc);
249 if ( (NULL == pc_head) && 249 if ( (NULL == pc_head) &&
250 (NULL == pic) ) 250 (NULL == pic) )
251 tt = GNUNET_SCHEDULER_add_now (&state_machine, NULL); 251 tt = GNUNET_SCHEDULER_add_now (&state_machine, NULL);
252} 252}
253 253
254 254
@@ -330,7 +330,7 @@ print_address (void *cls, const struct GNUNET_HELLO_Address *address,
330 * Currently prints the GNUNET_PeerIdentity and the transport address. 330 * Currently prints the GNUNET_PeerIdentity and the transport address.
331 * 331 *
332 * @param cls the 'struct PrintContext' 332 * @param cls the 'struct PrintContext'
333 * @param peer identity of the peer 333 * @param peer identity of the peer
334 * @param hello addresses of the peer 334 * @param hello addresses of the peer
335 * @param err_msg error message 335 * @param err_msg error message
336 */ 336 */
@@ -346,7 +346,7 @@ print_peer_info (void *cls, const struct GNUNET_PeerIdentity *peer,
346 pic = NULL; /* end of iteration */ 346 pic = NULL; /* end of iteration */
347 if (NULL != err_msg) 347 if (NULL != err_msg)
348 { 348 {
349 FPRINTF (stderr, 349 FPRINTF (stderr,
350 _("Error in communication with PEERINFO service: %s\n"), 350 _("Error in communication with PEERINFO service: %s\n"),
351 err_msg); 351 err_msg);
352 } 352 }
@@ -366,13 +366,13 @@ print_peer_info (void *cls, const struct GNUNET_PeerIdentity *peer,
366 } 366 }
367 pc = GNUNET_malloc (sizeof (struct PrintContext)); 367 pc = GNUNET_malloc (sizeof (struct PrintContext));
368 GNUNET_CONTAINER_DLL_insert (pc_head, 368 GNUNET_CONTAINER_DLL_insert (pc_head,
369 pc_tail, 369 pc_tail,
370 pc); 370 pc);
371 pc->peer = *peer; 371 pc->peer = *peer;
372 pc->friend_only = friend_only; 372 pc->friend_only = friend_only;
373 GNUNET_HELLO_iterate_addresses (hello, 373 GNUNET_HELLO_iterate_addresses (hello,
374 GNUNET_NO, 374 GNUNET_NO,
375 &count_address, 375 &count_address,
376 pc); 376 pc);
377 if (0 == pc->off) 377 if (0 == pc->off)
378 { 378 {
@@ -381,7 +381,7 @@ print_peer_info (void *cls, const struct GNUNET_PeerIdentity *peer,
381 } 381 }
382 pc->address_list_size = pc->off; 382 pc->address_list_size = pc->off;
383 pc->address_list = GNUNET_malloc (sizeof (struct AddressRecord) * pc->off); 383 pc->address_list = GNUNET_malloc (sizeof (struct AddressRecord) * pc->off);
384 GNUNET_HELLO_iterate_addresses (hello, GNUNET_NO, 384 GNUNET_HELLO_iterate_addresses (hello, GNUNET_NO,
385 &print_address, pc); 385 &print_address, pc);
386} 386}
387 387
@@ -479,7 +479,7 @@ dump_my_hello (void *cls, const struct GNUNET_PeerIdentity *peer,
479 */ 479 */
480static void 480static void
481print_my_uri (void *cls, const struct GNUNET_PeerIdentity *peer, 481print_my_uri (void *cls, const struct GNUNET_PeerIdentity *peer,
482 const struct GNUNET_HELLO_Message *hello, 482 const struct GNUNET_HELLO_Message *hello,
483 const char *err_msg) 483 const char *err_msg)
484{ 484{
485 if (peer == NULL) 485 if (peer == NULL)
@@ -487,7 +487,7 @@ print_my_uri (void *cls, const struct GNUNET_PeerIdentity *peer,
487 pic = NULL; 487 pic = NULL;
488 if (err_msg != NULL) 488 if (err_msg != NULL)
489 FPRINTF (stderr, 489 FPRINTF (stderr,
490 _("Error in communication with PEERINFO service: %s\n"), 490 _("Error in communication with PEERINFO service: %s\n"),
491 err_msg); 491 err_msg);
492 tt = GNUNET_SCHEDULER_add_now (&state_machine, NULL); 492 tt = GNUNET_SCHEDULER_add_now (&state_machine, NULL);
493 return; 493 return;
@@ -526,7 +526,7 @@ add_continuation (void *cls,
526 526
527 527
528/** 528/**
529 * Parse the PUT URI given at the command line and add it to our peerinfo 529 * Parse the PUT URI given at the command line and add it to our peerinfo
530 * database. 530 * database.
531 * 531 *
532 * @param put_uri URI string to parse 532 * @param put_uri URI string to parse
@@ -537,7 +537,7 @@ parse_hello_uri (const char *put_uri)
537{ 537{
538 struct GNUNET_HELLO_Message *hello = NULL; 538 struct GNUNET_HELLO_Message *hello = NULL;
539 539
540 int ret = GNUNET_HELLO_parse_uri(put_uri, &my_peer_identity.public_key, 540 int ret = GNUNET_HELLO_parse_uri(put_uri, &my_peer_identity.public_key,
541 &hello, &GPI_plugins_find); 541 &hello, &GPI_plugins_find);
542 542
543 if (NULL != hello) { 543 if (NULL != hello) {
@@ -639,10 +639,10 @@ run (void *cls, char *const *args, const char *cfgfile,
639 put_uri = GNUNET_strdup (args[0]); 639 put_uri = GNUNET_strdup (args[0]);
640 args++; 640 args++;
641 } 641 }
642 if (NULL != args[0]) 642 if (NULL != args[0])
643 { 643 {
644 FPRINTF (stderr, 644 FPRINTF (stderr,
645 _("Invalid command line argument `%s'\n"), 645 _("Invalid command line argument `%s'\n"),
646 args[0]); 646 args[0]);
647 return; 647 return;
648 } 648 }
@@ -669,7 +669,7 @@ run (void *cls, char *const *args, const char *cfgfile,
669 return; 669 return;
670 } 670 }
671 GNUNET_free (fn); 671 GNUNET_free (fn);
672 GNUNET_CRYPTO_ecc_key_get_public_for_signature (priv, 672 GNUNET_CRYPTO_ecc_key_get_public_for_signature (priv,
673 &my_peer_identity.public_key); 673 &my_peer_identity.public_key);
674 GNUNET_free (priv); 674 GNUNET_free (priv);
675 } 675 }
@@ -719,7 +719,7 @@ state_machine (void *cls,
719 { 719 {
720 get_self = GNUNET_NO; 720 get_self = GNUNET_NO;
721 if (be_quiet) 721 if (be_quiet)
722 printf ("%s\n", 722 printf ("%s\n",
723 GNUNET_i2s_full (&my_peer_identity)); 723 GNUNET_i2s_full (&my_peer_identity));
724 else 724 else
725 printf (_("I am peer `%s'.\n"), 725 printf (_("I am peer `%s'.\n"),