aboutsummaryrefslogtreecommitdiff
path: root/src/peerinfo-tool/gnunet-peerinfo.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-06-09 09:28:54 +0000
committerChristian Grothoff <christian@grothoff.org>2014-06-09 09:28:54 +0000
commit1e0f7e71c0f8fa00a675b6476fb1a8f74fbfaa07 (patch)
treee7989f1ab8ef94a2540d6ecc82db3aaeda380f86 /src/peerinfo-tool/gnunet-peerinfo.c
parente43211d969b27eeb38043b5fd67232c1e593c83d (diff)
downloadgnunet-1e0f7e71c0f8fa00a675b6476fb1a8f74fbfaa07.tar.gz
gnunet-1e0f7e71c0f8fa00a675b6476fb1a8f74fbfaa07.zip
-fixing doxygen, indentation
Diffstat (limited to 'src/peerinfo-tool/gnunet-peerinfo.c')
-rw-r--r--src/peerinfo-tool/gnunet-peerinfo.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/peerinfo-tool/gnunet-peerinfo.c b/src/peerinfo-tool/gnunet-peerinfo.c
index 9f2370731..b16ad9cbf 100644
--- a/src/peerinfo-tool/gnunet-peerinfo.c
+++ b/src/peerinfo-tool/gnunet-peerinfo.c
@@ -261,13 +261,17 @@ dump_pc (struct PrintContext *pc)
261 * 261 *
262 * @param cls closure 262 * @param cls closure
263 * @param address NULL on error, otherwise 0-terminated printable UTF-8 string 263 * @param address NULL on error, otherwise 0-terminated printable UTF-8 string
264 * @param res result of the address to string conversion:
265 * if #GNUNET_OK: address was valid (conversion to
266 * string might still have failed)
267 * if #GNUNET_SYSERR: address is invalid
264 */ 268 */
265static void 269static void
266process_resolved_address (void *cls, 270process_resolved_address (void *cls,
267 const char *address, 271 const char *address,
268 int res) 272 int res)
269{ 273{
270 struct AddressRecord * ar = cls; 274 struct AddressRecord *ar = cls;
271 struct PrintContext *pc = ar->pc; 275 struct PrintContext *pc = ar->pc;
272 276
273 if (NULL != address) 277 if (NULL != address)
@@ -276,7 +280,6 @@ process_resolved_address (void *cls,
276 ar->result = GNUNET_strdup (address); 280 ar->result = GNUNET_strdup (address);
277 return; 281 return;
278 } 282 }
279
280 ar->atsc = NULL; 283 ar->atsc = NULL;
281 if (GNUNET_SYSERR == res) 284 if (GNUNET_SYSERR == res)
282 { 285 {
@@ -328,6 +331,7 @@ print_address (void *cls,
328{ 331{
329 struct PrintContext *pc = cls; 332 struct PrintContext *pc = cls;
330 struct AddressRecord *ar; 333 struct AddressRecord *ar;
334
331 GNUNET_assert (0 < pc->off); 335 GNUNET_assert (0 < pc->off);
332 ar = &pc->address_list[--pc->off]; 336 ar = &pc->address_list[--pc->off];
333 ar->pc = pc; 337 ar->pc = pc;
@@ -376,7 +380,8 @@ print_peer_info (void *cls,
376 friend_only = GNUNET_NO; 380 friend_only = GNUNET_NO;
377 if (NULL != hello) 381 if (NULL != hello)
378 friend_only = GNUNET_HELLO_is_friend_only (hello); 382 friend_only = GNUNET_HELLO_is_friend_only (hello);
379 if ((GNUNET_YES == be_quiet) || (NULL == hello)) 383 if ( (GNUNET_YES == be_quiet) ||
384 (NULL == hello) )
380 { 385 {
381 printf ("%s%s\n", 386 printf ("%s%s\n",
382 (GNUNET_YES == friend_only) ? "F2F: " : "", 387 (GNUNET_YES == friend_only) ? "F2F: " : "",
@@ -400,8 +405,10 @@ print_peer_info (void *cls,
400 } 405 }
401 pc->address_list_size = pc->off; 406 pc->address_list_size = pc->off;
402 pc->address_list = GNUNET_malloc (sizeof (struct AddressRecord) * pc->off); 407 pc->address_list = GNUNET_malloc (sizeof (struct AddressRecord) * pc->off);
403 GNUNET_HELLO_iterate_addresses (hello, GNUNET_NO, 408 GNUNET_HELLO_iterate_addresses (hello,
404 &print_address, pc); 409 GNUNET_NO,
410 &print_address,
411 pc);
405} 412}
406 413
407/* ************************* DUMP Hello ************************** */ 414/* ************************* DUMP Hello ************************** */
@@ -427,7 +434,7 @@ count_addr (void *cls,
427 434
428 435
429/** 436/**
430 * Write Hello of my peer to a file. 437 * Write HELLO of my peer to a file.
431 * 438 *
432 * @param cls the `struct GetUriContext *` 439 * @param cls the `struct GetUriContext *`
433 * @param peer identity of the peer (unused) 440 * @param peer identity of the peer (unused)