diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-11-29 20:47:18 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-11-29 20:47:18 +0000 |
commit | 71ea5bd2d05058008e604ffd42993be9c7250e04 (patch) | |
tree | a5074671ddfaa9d1621a4182fc95a91a98b3d536 /src/dv | |
parent | b335777fd435142c16eb05e86c8a64a4b1a45447 (diff) | |
download | gnunet-71ea5bd2d05058008e604ffd42993be9c7250e04.tar.gz gnunet-71ea5bd2d05058008e604ffd42993be9c7250e04.zip |
-fixing indentation
Diffstat (limited to 'src/dv')
-rw-r--r-- | src/dv/plugin_transport_dv.c | 15 | ||||
-rw-r--r-- | src/dv/test_transport_api_dv.c | 17 |
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, | |||
160 | my_id, GNUNET_i2s (sender), | 160 | my_id, GNUNET_i2s (sender), |
161 | ntohs (((struct GNUNET_MessageHeader *) msg)->type), | 161 | ntohs (((struct GNUNET_MessageHeader *) msg)->type), |
162 | distance); | 162 | distance); |
163 | if (sender_address_len == (2 * sizeof(struct GNUNET_PeerIdentity))) | 163 | if (sender_address_len == (2 * sizeof (struct GNUNET_PeerIdentity))) |
164 | { | 164 | { |
165 | 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)); | 165 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "plugin_transport_dv", |
166 | } | 166 | "Parsed sender address: %s:%s\n", |
167 | GNUNET_i2s ((struct GNUNET_PeerIdentity *) sender_address), | ||
168 | GNUNET_h2s (& | ||
169 | ((struct GNUNET_PeerIdentity *) | ||
170 | &sender_address[sizeof | ||
171 | (struct | ||
172 | GNUNET_PeerIdentity)])->hashPubKey)); | ||
173 | } | ||
167 | 174 | ||
168 | GNUNET_free_non_null (my_id); | 175 | GNUNET_free_non_null (my_id); |
169 | #endif | 176 | #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); | |||
394 | * @return connected transport distance | 394 | * @return connected transport distance |
395 | */ | 395 | */ |
396 | static uint32_t | 396 | static uint32_t |
397 | get_atsi_distance (const struct GNUNET_ATS_Information *atsi, unsigned int atsi_count) | 397 | get_atsi_distance (const struct GNUNET_ATS_Information *atsi, |
398 | unsigned int atsi_count) | ||
398 | { | 399 | { |
399 | unsigned int i; | 400 | unsigned int i; |
400 | 401 | ||
401 | for (i = 0; i < atsi_count; i++) | 402 | for (i = 0; i < atsi_count; i++) |
402 | { | 403 | { |
403 | if (ntohl (atsi->type) == GNUNET_ATS_QUALITY_NET_DISTANCE) | 404 | if (ntohl (atsi->type) == GNUNET_ATS_QUALITY_NET_DISTANCE) |
404 | return ntohl (atsi->value); | 405 | return ntohl (atsi->value); |
405 | } | 406 | } |
406 | 407 | ||
407 | GNUNET_break (0); | 408 | GNUNET_break (0); |
408 | /* FIXME: we do not have distance data? Assume direct neighbor. */ | 409 | /* 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_ | |||
411 | 412 | ||
412 | 413 | ||
413 | static int | 414 | static int |
414 | process_mtype (void *cls, | 415 | process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, |
415 | const struct GNUNET_PeerIdentity *peer, | ||
416 | const struct GNUNET_MessageHeader *message, | 416 | const struct GNUNET_MessageHeader *message, |
417 | const struct GNUNET_ATS_Information *atsi, | 417 | const struct GNUNET_ATS_Information *atsi, |
418 | unsigned int atsi_count) | 418 | unsigned int atsi_count) |
@@ -464,7 +464,8 @@ process_mtype (void *cls, | |||
464 | { | 464 | { |
465 | GNUNET_SCHEDULER_cancel (die_task); | 465 | GNUNET_SCHEDULER_cancel (die_task); |
466 | #if VERBOSE | 466 | #if VERBOSE |
467 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Scheduling timeout from DV connections.\n"); | 467 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
468 | "Scheduling timeout from DV connections.\n"); | ||
468 | #endif | 469 | #endif |
469 | die_task = | 470 | die_task = |
470 | GNUNET_SCHEDULER_add_delayed (TEST_TIMEOUT, &end_badly, | 471 | GNUNET_SCHEDULER_add_delayed (TEST_TIMEOUT, &end_badly, |