diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-09-19 09:38:28 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-09-19 09:38:28 +0000 |
commit | 1ac596f8ff18fbedf0ef5c38c8d9c18ccee20705 (patch) | |
tree | b4c78b88d9be1de0724b72f2e72bae34506cc632 /src/ats/ats_api.c | |
parent | bc12a9d6289bb161aa9b427f9ef320c569a74d16 (diff) | |
download | gnunet-1ac596f8ff18fbedf0ef5c38c8d9c18ccee20705.tar.gz gnunet-1ac596f8ff18fbedf0ef5c38c8d9c18ccee20705.zip |
indentation
Diffstat (limited to 'src/ats/ats_api.c')
-rw-r--r-- | src/ats/ats_api.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/ats/ats_api.c b/src/ats/ats_api.c index a411d4dcb..633d71c20 100644 --- a/src/ats/ats_api.c +++ b/src/ats/ats_api.c | |||
@@ -332,16 +332,13 @@ GNUNET_ATS_suggest_address (struct GNUNET_ATS_Handle *atc, | |||
332 | "Looking up suggested address for peer `%s'\n", | 332 | "Looking up suggested address for peer `%s'\n", |
333 | GNUNET_i2s (peer)); | 333 | GNUNET_i2s (peer)); |
334 | #endif | 334 | #endif |
335 | int count = 0; | ||
336 | |||
337 | asc = GNUNET_malloc (sizeof (struct GNUNET_ATS_SuggestionContext)); | 335 | asc = GNUNET_malloc (sizeof (struct GNUNET_ATS_SuggestionContext)); |
338 | asc->cb = cb; | 336 | asc->cb = cb; |
339 | asc->cb_cls = cb_cls; | 337 | asc->cb_cls = cb_cls; |
340 | asc->atc = atc; | 338 | asc->atc = atc; |
341 | asc->target = *peer; | 339 | asc->target = *peer; |
342 | count = | 340 | (void) GNUNET_CONTAINER_multihashmap_get_multiple (atc->peers, &peer->hashPubKey, |
343 | GNUNET_CONTAINER_multihashmap_get_multiple (atc->peers, &peer->hashPubKey, | 341 | &suggest_address, asc); |
344 | &suggest_address, asc); | ||
345 | 342 | ||
346 | if (NULL == asc->cb) | 343 | if (NULL == asc->cb) |
347 | { | 344 | { |
@@ -589,7 +586,7 @@ create_allocation_record (const char *plugin_name, struct Session *session, | |||
589 | ar->plugin_addr = &ar[1]; | 586 | ar->plugin_addr = &ar[1]; |
590 | memcpy (&ar[1], plugin_addr, plugin_addr_len); | 587 | memcpy (&ar[1], plugin_addr, plugin_addr_len); |
591 | ar->session = session; | 588 | ar->session = session; |
592 | ar->plugin_addr_len = plugin_addr_len; | 589 | ar->plugin_addr_len = plugin_addr_len; |
593 | GNUNET_assert (ats_count > 0); | 590 | GNUNET_assert (ats_count > 0); |
594 | GNUNET_array_grow (ar->ats, ar->ats_count, ats_count); | 591 | GNUNET_array_grow (ar->ats, ar->ats_count, ats_count); |
595 | memcpy (ar->ats, ats, | 592 | memcpy (ar->ats, ats, |
@@ -808,13 +805,11 @@ GNUNET_ATS_address_update (struct GNUNET_ATS_Handle *atc, | |||
808 | struct AllocationRecord *ar; | 805 | struct AllocationRecord *ar; |
809 | struct UpdateSessionContext usc; | 806 | struct UpdateSessionContext usc; |
810 | 807 | ||
811 | |||
812 | #if DEBUG_ATS | 808 | #if DEBUG_ATS |
813 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "ats-api", | 809 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "ats-api", |
814 | "Updating address for peer `%s', plugin `%s'\n", | 810 | "Updating address for peer `%s', plugin `%s'\n", |
815 | GNUNET_i2s (peer), plugin_name); | 811 | GNUNET_i2s (peer), plugin_name); |
816 | #endif | 812 | #endif |
817 | |||
818 | ar = create_allocation_record (plugin_name, session, plugin_addr, | 813 | ar = create_allocation_record (plugin_name, session, plugin_addr, |
819 | plugin_addr_len, ats, ats_count); | 814 | plugin_addr_len, ats, ats_count); |
820 | usc.atc = atc; | 815 | usc.atc = atc; |