aboutsummaryrefslogtreecommitdiff
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
parente43211d969b27eeb38043b5fd67232c1e593c83d (diff)
downloadgnunet-1e0f7e71c0f8fa00a675b6476fb1a8f74fbfaa07.tar.gz
gnunet-1e0f7e71c0f8fa00a675b6476fb1a8f74fbfaa07.zip
-fixing doxygen, indentation
-rw-r--r--src/include/gnunet_transport_service.h7
-rw-r--r--src/peerinfo-tool/gnunet-peerinfo.c19
-rw-r--r--src/transport/transport_api_address_to_string.c11
3 files changed, 24 insertions, 13 deletions
diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h
index a1b88c309..9e82a0dda 100644
--- a/src/include/gnunet_transport_service.h
+++ b/src/include/gnunet_transport_service.h
@@ -285,9 +285,10 @@ typedef void
285 * @param cls closure 285 * @param cls closure
286 * @param address NULL on error or end of iteration, 286 * @param address NULL on error or end of iteration,
287 * otherwise 0-terminated printable UTF-8 string 287 * otherwise 0-terminated printable UTF-8 string
288 * @param res result of the address to string conversion: GNUNET_OK or GNUNET_SYSERR 288 * @param res result of the address to string conversion:
289 * if GNUNET_OK: address contains address as string 289 * if #GNUNET_OK: address was valid (conversion to
290 * if GNUNET_SYSERR: address is invalid 290 * string might still have failed)
291 * if #GNUNET_SYSERR: address is invalid
291 */ 292 */
292typedef void 293typedef void
293(*GNUNET_TRANSPORT_AddressToStringCallback) (void *cls, 294(*GNUNET_TRANSPORT_AddressToStringCallback) (void *cls,
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)
diff --git a/src/transport/transport_api_address_to_string.c b/src/transport/transport_api_address_to_string.c
index a56616ea8..d881f9a08 100644
--- a/src/transport/transport_api_address_to_string.c
+++ b/src/transport/transport_api_address_to_string.c
@@ -55,12 +55,13 @@ struct GNUNET_TRANSPORT_AddressToStringContext
55/** 55/**
56 * Function called with responses from the service. 56 * Function called with responses from the service.
57 * 57 *
58 * @param cls our 'struct GNUNET_TRANSPORT_AddressToStringContext*' 58 * @param cls our `struct GNUNET_TRANSPORT_AddressToStringContext *`
59 * @param msg NULL on timeout or error, otherwise presumably a 59 * @param msg NULL on timeout or error, otherwise presumably a
60 * message with the human-readable address 60 * message with the human-readable address
61 */ 61 */
62static void 62static void
63address_response_processor (void *cls, const struct GNUNET_MessageHeader *msg) 63address_response_processor (void *cls,
64 const struct GNUNET_MessageHeader *msg)
64{ 65{
65 struct GNUNET_TRANSPORT_AddressToStringContext *alucb = cls; 66 struct GNUNET_TRANSPORT_AddressToStringContext *alucb = cls;
66 struct AddressToStringResultMessage *atsm; 67 struct AddressToStringResultMessage *atsm;
@@ -70,9 +71,11 @@ address_response_processor (void *cls, const struct GNUNET_MessageHeader *msg)
70 uint32_t addr_len; 71 uint32_t addr_len;
71 char *empty_str = ""; 72 char *empty_str = "";
72 73
73 if (msg == NULL) 74 if (NULL == msg)
74 { 75 {
75 alucb->cb (alucb->cb_cls, NULL, GNUNET_OK); 76 alucb->cb (alucb->cb_cls,
77 NULL,
78 GNUNET_OK);
76 GNUNET_CLIENT_disconnect (alucb->client); 79 GNUNET_CLIENT_disconnect (alucb->client);
77 GNUNET_free (alucb); 80 GNUNET_free (alucb);
78 return; 81 return;