summaryrefslogtreecommitdiff
path: root/src/dv
diff options
context:
space:
mode:
Diffstat (limited to 'src/dv')
-rw-r--r--src/dv/plugin_transport_dv.c15
-rw-r--r--src/dv/test_transport_api_dv.c17
2 files changed, 20 insertions, 12 deletions
diff --git a/src/dv/plugin_transport_dv.c b/src/dv/plugin_transport_dv.c
index 569213f72..78200e634 100644
--- a/src/dv/plugin_transport_dv.c
+++ b/src/dv/plugin_transport_dv.c
@@ -160,10 +160,17 @@ handle_dv_message_received (void *cls, struct GNUNET_PeerIdentity *sender,
my_id, GNUNET_i2s (sender),
ntohs (((struct GNUNET_MessageHeader *) msg)->type),
distance);
- if (sender_address_len == (2 * sizeof(struct GNUNET_PeerIdentity)))
- {
- GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "plugin_transport_dv", "Parsed sender address: %s:%s\n", GNUNET_i2s((struct GNUNET_PeerIdentity *)sender_address), GNUNET_h2s(&((struct GNUNET_PeerIdentity *)&sender_address[sizeof(struct GNUNET_PeerIdentity)])->hashPubKey));
- }
+ if (sender_address_len == (2 * sizeof (struct GNUNET_PeerIdentity)))
+ {
+ GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "plugin_transport_dv",
+ "Parsed sender address: %s:%s\n",
+ GNUNET_i2s ((struct GNUNET_PeerIdentity *) sender_address),
+ GNUNET_h2s (&
+ ((struct GNUNET_PeerIdentity *)
+ &sender_address[sizeof
+ (struct
+ GNUNET_PeerIdentity)])->hashPubKey));
+ }
GNUNET_free_non_null (my_id);
#endif
diff --git a/src/dv/test_transport_api_dv.c b/src/dv/test_transport_api_dv.c
index 5f40fb522..942ee07c0 100644
--- a/src/dv/test_transport_api_dv.c
+++ b/src/dv/test_transport_api_dv.c
@@ -394,15 +394,16 @@ send_other_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
* @return connected transport distance
*/
static uint32_t
-get_atsi_distance (const struct GNUNET_ATS_Information *atsi, unsigned int atsi_count)
+get_atsi_distance (const struct GNUNET_ATS_Information *atsi,
+ unsigned int atsi_count)
{
unsigned int i;
for (i = 0; i < atsi_count; i++)
- {
- if (ntohl (atsi->type) == GNUNET_ATS_QUALITY_NET_DISTANCE)
- return ntohl (atsi->value);
- }
+ {
+ if (ntohl (atsi->type) == GNUNET_ATS_QUALITY_NET_DISTANCE)
+ return ntohl (atsi->value);
+ }
GNUNET_break (0);
/* FIXME: we do not have distance data? Assume direct neighbor. */
@@ -411,8 +412,7 @@ get_atsi_distance (const struct GNUNET_ATS_Information *atsi, unsigned int atsi_
static int
-process_mtype (void *cls,
- const struct GNUNET_PeerIdentity *peer,
+process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
const struct GNUNET_MessageHeader *message,
const struct GNUNET_ATS_Information *atsi,
unsigned int atsi_count)
@@ -464,7 +464,8 @@ process_mtype (void *cls,
{
GNUNET_SCHEDULER_cancel (die_task);
#if VERBOSE
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Scheduling timeout from DV connections.\n");
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Scheduling timeout from DV connections.\n");
#endif
die_task =
GNUNET_SCHEDULER_add_delayed (TEST_TIMEOUT, &end_badly,