[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r33750 - gnunet/src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r33750 - gnunet/src/transport |
Date: |
Sun, 22 Jun 2014 22:02:10 +0200 |
Author: grothoff
Date: 2014-06-22 22:02:10 +0200 (Sun, 22 Jun 2014)
New Revision: 33750
Modified:
gnunet/src/transport/gnunet-service-transport_validation.c
gnunet/src/transport/transport_api_monitoring.c
Log:
-doxygen, indentation
Modified: gnunet/src/transport/gnunet-service-transport_validation.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_validation.c 2014-06-22
19:57:22 UTC (rev 33749)
+++ gnunet/src/transport/gnunet-service-transport_validation.c 2014-06-22
20:02:10 UTC (rev 33750)
@@ -597,9 +597,10 @@
network = papi->get_network (papi->cls, session);
if (GNUNET_ATS_NET_UNSPECIFIED == network)
{
- GNUNET_log(GNUNET_ERROR_TYPE_ERROR,
- "Could not obtain a valid network for `%s' `%s'\n",
- GNUNET_i2s (pid), GST_plugins_a2s (ve->address));
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Could not obtain a valid network for `%s' `%s'\n",
+ GNUNET_i2s (pid),
+ GST_plugins_a2s (ve->address));
GNUNET_break(0);
}
GST_neighbours_notify_data_sent (pid, ve->address, session, tsize);
@@ -607,8 +608,10 @@
else
{
/* Could not get a valid session */
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Could not get a valid session
for `%s' `%s'\n",
- GNUNET_i2s (pid), GST_plugins_a2s (ve->address));
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Could not get a valid session for `%s' `%s'\n",
+ GNUNET_i2s (pid),
+ GST_plugins_a2s (ve->address));
ret = -1;
}
}
@@ -623,10 +626,10 @@
ve->network = network;
ve->expecting_pong = GNUNET_YES;
- validations_running ++;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Validation started, %u validation processes running\n",
- validations_running);
+ validations_running++;
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Validation started, %u validation processes running\n",
+ validations_running);
/* Notify about PING sent */
validation_entry_changed (ve, GNUNET_TRANSPORT_VS_UPDATE);
}
@@ -943,27 +946,30 @@
{
struct TransportPongMessage *pong = cls;
struct GNUNET_TRANSPORT_PluginFunctions *papi;
+ struct Session *session;
papi = GST_plugins_find (address->transport_name);
- if (papi == NULL)
+ if (NULL == papi)
return;
- GNUNET_assert (papi->send != NULL);
- GNUNET_assert (papi->get_session != NULL);
-
- struct Session * session = papi->get_session(papi->cls, address);
- if (session == NULL)
+ GNUNET_assert (NULL != papi->send);
+ GNUNET_assert (NULL != papi->get_session);
+ session = papi->get_session(papi->cls, address);
+ if (NULL == session)
{
GNUNET_break (0);
return;
}
-
papi->send (papi->cls, session,
- (const char *) pong, ntohs (pong->header.size),
- PONG_PRIORITY, ACCEPTABLE_PING_DELAY,
+ (const char *) pong,
+ ntohs (pong->header.size),
+ PONG_PRIORITY,
+ ACCEPTABLE_PING_DELAY,
NULL, NULL);
GST_neighbours_notify_data_sent (&address->peer,
- address, session, pong->header.size);
+ address,
+ session,
+ pong->header.size);
}
@@ -1197,7 +1203,7 @@
pong->header.size);
}
}
- if (ret != -1)
+ if (-1 != ret)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Transmitted PONG to `%s' via reliable mechanism\n",
Modified: gnunet/src/transport/transport_api_monitoring.c
===================================================================
--- gnunet/src/transport/transport_api_monitoring.c 2014-06-22 19:57:22 UTC
(rev 33749)
+++ gnunet/src/transport/transport_api_monitoring.c 2014-06-22 20:02:10 UTC
(rev 33750)
@@ -48,7 +48,7 @@
GNUNET_TRANSPORT_PeerIterateCallback cb;
/**
- * Closure for cb.
+ * Closure for @e cb.
*/
void *cb_cls;
@@ -100,7 +100,7 @@
GNUNET_TRANSPORT_ValidationIterateCallback cb;
/**
- * Closure for cb.
+ * Closure for @e cb.
*/
void *cb_cls;
@@ -140,11 +140,12 @@
int one_shot;
};
+
/**
* Check if a state is defined as connected
*
* @param state the state value
- * @return GNUNET_YES or GNUNET_NO
+ * @return #GNUNET_YES or #GNUNET_NO
*/
int
GNUNET_TRANSPORT_is_connected (enum GNUNET_TRANSPORT_PeerState state)
@@ -175,6 +176,7 @@
return GNUNET_SYSERR;
}
+
/**
* Convert peer state to human-readable string.
*
@@ -214,6 +216,7 @@
}
}
+
/**
* Convert validation state to human-readable string.
*
@@ -250,7 +253,8 @@
* message with the human-readable address
*/
static void
-peer_response_processor (void *cls, const struct GNUNET_MessageHeader *msg);
+peer_response_processor (void *cls,
+ const struct GNUNET_MessageHeader *msg);
/**
@@ -261,8 +265,10 @@
* message with the human-readable address
*/
static void
-val_response_processor (void *cls, const struct GNUNET_MessageHeader *msg);
+val_response_processor (void *cls,
+ const struct GNUNET_MessageHeader *msg);
+
/**
* Send our subscription request to the service.
*
@@ -279,13 +285,14 @@
msg.peer = pal_ctx->peer;
GNUNET_assert (GNUNET_OK ==
GNUNET_CLIENT_transmit_and_get_response (pal_ctx->client,
- &msg.header,
- GNUNET_TIME_absolute_get_remaining (pal_ctx->timeout),
- GNUNET_YES,
- &peer_response_processor,
- pal_ctx));
+ &msg.header,
+
GNUNET_TIME_absolute_get_remaining (pal_ctx->timeout),
+ GNUNET_YES,
+
&peer_response_processor,
+ pal_ctx));
}
+
/**
* Send our subscription request to the service.
*
@@ -312,12 +319,12 @@
/**
* Task run to re-establish the connection.
*
- * @param cls our 'struct GNUNET_TRANSPORT_PeerAddressLookupContext*'
+ * @param cls our `struct GNUNET_TRANSPORT_PeerAddressLookupContext *`
* @param tc scheduler context, unused
*/
static void
do_peer_connect (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+ const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct GNUNET_TRANSPORT_PeerMonitoringContext *pal_ctx = cls;
@@ -367,6 +374,7 @@
send_val_mon_request (val_ctx);
}
+
/**
* Cut the existing connection and reconnect.
*
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r33750 - gnunet/src/transport,
gnunet <=