[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r33613 - in gnunet/src: include peerinfo-tool transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r33613 - in gnunet/src: include peerinfo-tool transport |
Date: |
Mon, 9 Jun 2014 11:28:54 +0200 |
Author: grothoff
Date: 2014-06-09 11:28:54 +0200 (Mon, 09 Jun 2014)
New Revision: 33613
Modified:
gnunet/src/include/gnunet_transport_service.h
gnunet/src/peerinfo-tool/gnunet-peerinfo.c
gnunet/src/transport/transport_api_address_to_string.c
Log:
-fixing doxygen, indentation
Modified: gnunet/src/include/gnunet_transport_service.h
===================================================================
--- gnunet/src/include/gnunet_transport_service.h 2014-06-09 09:03:18 UTC
(rev 33612)
+++ gnunet/src/include/gnunet_transport_service.h 2014-06-09 09:28:54 UTC
(rev 33613)
@@ -285,9 +285,10 @@
* @param cls closure
* @param address NULL on error or end of iteration,
* otherwise 0-terminated printable UTF-8 string
- * @param res result of the address to string conversion: GNUNET_OK or
GNUNET_SYSERR
- * if GNUNET_OK: address contains address as string
- * if GNUNET_SYSERR: address is invalid
+ * @param res result of the address to string conversion:
+ * if #GNUNET_OK: address was valid (conversion to
+ * string might still have failed)
+ * if #GNUNET_SYSERR: address is invalid
*/
typedef void
(*GNUNET_TRANSPORT_AddressToStringCallback) (void *cls,
Modified: gnunet/src/peerinfo-tool/gnunet-peerinfo.c
===================================================================
--- gnunet/src/peerinfo-tool/gnunet-peerinfo.c 2014-06-09 09:03:18 UTC (rev
33612)
+++ gnunet/src/peerinfo-tool/gnunet-peerinfo.c 2014-06-09 09:28:54 UTC (rev
33613)
@@ -261,13 +261,17 @@
*
* @param cls closure
* @param address NULL on error, otherwise 0-terminated printable UTF-8 string
+ * @param res result of the address to string conversion:
+ * if #GNUNET_OK: address was valid (conversion to
+ * string might still have failed)
+ * if #GNUNET_SYSERR: address is invalid
*/
static void
process_resolved_address (void *cls,
const char *address,
int res)
{
- struct AddressRecord * ar = cls;
+ struct AddressRecord *ar = cls;
struct PrintContext *pc = ar->pc;
if (NULL != address)
@@ -276,7 +280,6 @@
ar->result = GNUNET_strdup (address);
return;
}
-
ar->atsc = NULL;
if (GNUNET_SYSERR == res)
{
@@ -328,6 +331,7 @@
{
struct PrintContext *pc = cls;
struct AddressRecord *ar;
+
GNUNET_assert (0 < pc->off);
ar = &pc->address_list[--pc->off];
ar->pc = pc;
@@ -376,7 +380,8 @@
friend_only = GNUNET_NO;
if (NULL != hello)
friend_only = GNUNET_HELLO_is_friend_only (hello);
- if ((GNUNET_YES == be_quiet) || (NULL == hello))
+ if ( (GNUNET_YES == be_quiet) ||
+ (NULL == hello) )
{
printf ("%s%s\n",
(GNUNET_YES == friend_only) ? "F2F: " : "",
@@ -400,8 +405,10 @@
}
pc->address_list_size = pc->off;
pc->address_list = GNUNET_malloc (sizeof (struct AddressRecord) * pc->off);
- GNUNET_HELLO_iterate_addresses (hello, GNUNET_NO,
- &print_address, pc);
+ GNUNET_HELLO_iterate_addresses (hello,
+ GNUNET_NO,
+ &print_address,
+ pc);
}
/* ************************* DUMP Hello ************************** */
@@ -427,7 +434,7 @@
/**
- * Write Hello of my peer to a file.
+ * Write HELLO of my peer to a file.
*
* @param cls the `struct GetUriContext *`
* @param peer identity of the peer (unused)
Modified: gnunet/src/transport/transport_api_address_to_string.c
===================================================================
--- gnunet/src/transport/transport_api_address_to_string.c 2014-06-09
09:03:18 UTC (rev 33612)
+++ gnunet/src/transport/transport_api_address_to_string.c 2014-06-09
09:28:54 UTC (rev 33613)
@@ -55,12 +55,13 @@
/**
* Function called with responses from the service.
*
- * @param cls our 'struct GNUNET_TRANSPORT_AddressToStringContext*'
+ * @param cls our `struct GNUNET_TRANSPORT_AddressToStringContext *`
* @param msg NULL on timeout or error, otherwise presumably a
* message with the human-readable address
*/
static void
-address_response_processor (void *cls, const struct GNUNET_MessageHeader *msg)
+address_response_processor (void *cls,
+ const struct GNUNET_MessageHeader *msg)
{
struct GNUNET_TRANSPORT_AddressToStringContext *alucb = cls;
struct AddressToStringResultMessage *atsm;
@@ -70,9 +71,11 @@
uint32_t addr_len;
char *empty_str = "";
- if (msg == NULL)
+ if (NULL == msg)
{
- alucb->cb (alucb->cb_cls, NULL, GNUNET_OK);
+ alucb->cb (alucb->cb_cls,
+ NULL,
+ GNUNET_OK);
GNUNET_CLIENT_disconnect (alucb->client);
GNUNET_free (alucb);
return;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r33613 - in gnunet/src: include peerinfo-tool transport,
gnunet <=