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/peerinfo | |
parent | b335777fd435142c16eb05e86c8a64a4b1a45447 (diff) | |
download | gnunet-71ea5bd2d05058008e604ffd42993be9c7250e04.tar.gz gnunet-71ea5bd2d05058008e604ffd42993be9c7250e04.zip |
-fixing indentation
Diffstat (limited to 'src/peerinfo')
-rw-r--r-- | src/peerinfo/gnunet-service-peerinfo.c | 7 | ||||
-rwxr-xr-x | src/peerinfo/perf_peerinfo_api.c | 6 | ||||
-rw-r--r-- | src/peerinfo/test_peerinfo_api.c | 16 |
3 files changed, 14 insertions, 15 deletions
diff --git a/src/peerinfo/gnunet-service-peerinfo.c b/src/peerinfo/gnunet-service-peerinfo.c index fc7cc781f..799fdc6d8 100644 --- a/src/peerinfo/gnunet-service-peerinfo.c +++ b/src/peerinfo/gnunet-service-peerinfo.c | |||
@@ -122,8 +122,7 @@ make_info_message (const struct HostEntry *he) | |||
122 | * @return GNUNET_NO if expiration smaller than the current time | 122 | * @return GNUNET_NO if expiration smaller than the current time |
123 | */ | 123 | */ |
124 | static int | 124 | static int |
125 | discard_expired (void *cls, | 125 | discard_expired (void *cls, const struct GNUNET_HELLO_Address *address, |
126 | const struct GNUNET_HELLO_Address *address, | ||
127 | struct GNUNET_TIME_Absolute expiration) | 126 | struct GNUNET_TIME_Absolute expiration) |
128 | { | 127 | { |
129 | const struct GNUNET_TIME_Absolute *now = cls; | 128 | const struct GNUNET_TIME_Absolute *now = cls; |
@@ -131,8 +130,8 @@ discard_expired (void *cls, | |||
131 | if (now->abs_value > expiration.abs_value) | 130 | if (now->abs_value > expiration.abs_value) |
132 | { | 131 | { |
133 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 132 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
134 | _("Removing expired address of transport `%s'\n"), | 133 | _("Removing expired address of transport `%s'\n"), |
135 | address->transport_name); | 134 | address->transport_name); |
136 | return GNUNET_NO; | 135 | return GNUNET_NO; |
137 | } | 136 | } |
138 | return GNUNET_OK; | 137 | return GNUNET_OK; |
diff --git a/src/peerinfo/perf_peerinfo_api.c b/src/peerinfo/perf_peerinfo_api.c index c4e6dcc12..38bbb828f 100755 --- a/src/peerinfo/perf_peerinfo_api.c +++ b/src/peerinfo/perf_peerinfo_api.c | |||
@@ -50,8 +50,8 @@ static struct GNUNET_PeerIdentity pid; | |||
50 | 50 | ||
51 | 51 | ||
52 | static int | 52 | static int |
53 | check_it (void *cls, | 53 | check_it (void *cls, const struct GNUNET_HELLO_Address *address, |
54 | const struct GNUNET_HELLO_Address *address, struct GNUNET_TIME_Absolute expiration) | 54 | struct GNUNET_TIME_Absolute expiration) |
55 | { | 55 | { |
56 | #if DEBUG | 56 | #if DEBUG |
57 | if (addrlen > 0) | 57 | if (addrlen > 0) |
@@ -80,7 +80,7 @@ address_generator (void *cls, size_t max, void *buf) | |||
80 | address.address = caddress; | 80 | address.address = caddress; |
81 | address.transport_name = "peerinfotest"; | 81 | address.transport_name = "peerinfotest"; |
82 | ret = | 82 | ret = |
83 | GNUNET_HELLO_add_address (&address, | 83 | GNUNET_HELLO_add_address (&address, |
84 | GNUNET_TIME_relative_to_absolute | 84 | GNUNET_TIME_relative_to_absolute |
85 | (GNUNET_TIME_UNIT_HOURS), buf, max); | 85 | (GNUNET_TIME_UNIT_HOURS), buf, max); |
86 | GNUNET_free (caddress); | 86 | GNUNET_free (caddress); |
diff --git a/src/peerinfo/test_peerinfo_api.c b/src/peerinfo/test_peerinfo_api.c index 607c1fa4e..fbd12c387 100644 --- a/src/peerinfo/test_peerinfo_api.c +++ b/src/peerinfo/test_peerinfo_api.c | |||
@@ -45,16 +45,17 @@ static struct GNUNET_PEERINFO_Handle *h; | |||
45 | static unsigned int retries; | 45 | static unsigned int retries; |
46 | 46 | ||
47 | static int | 47 | static int |
48 | check_it (void *cls, | 48 | check_it (void *cls, const struct GNUNET_HELLO_Address *address, |
49 | const struct GNUNET_HELLO_Address *address, | 49 | struct GNUNET_TIME_Absolute expiration) |
50 | struct GNUNET_TIME_Absolute expiration) | ||
51 | { | 50 | { |
52 | unsigned int *agc = cls; | 51 | unsigned int *agc = cls; |
53 | 52 | ||
54 | if (address != NULL) | 53 | if (address != NULL) |
55 | { | 54 | { |
56 | GNUNET_assert (0 == strcmp ("peerinfotest", address->transport_name)); | 55 | GNUNET_assert (0 == strcmp ("peerinfotest", address->transport_name)); |
57 | GNUNET_assert (0 == strncmp ("Address", address->address, address->address_length)); | 56 | GNUNET_assert (0 == |
57 | strncmp ("Address", address->address, | ||
58 | address->address_length)); | ||
58 | (*agc) -= (1 << (address->address_length - 1)); | 59 | (*agc) -= (1 << (address->address_length - 1)); |
59 | } | 60 | } |
60 | return GNUNET_OK; | 61 | return GNUNET_OK; |
@@ -75,10 +76,9 @@ address_generator (void *cls, size_t max, void *buf) | |||
75 | address.transport_name = "peerinfotest"; | 76 | address.transport_name = "peerinfotest"; |
76 | address.address_length = *agc; | 77 | address.address_length = *agc; |
77 | ret = | 78 | ret = |
78 | GNUNET_HELLO_add_address (&address, | 79 | GNUNET_HELLO_add_address (&address, |
79 | GNUNET_TIME_relative_to_absolute | 80 | GNUNET_TIME_relative_to_absolute |
80 | (GNUNET_TIME_UNIT_HOURS), buf, | 81 | (GNUNET_TIME_UNIT_HOURS), buf, max); |
81 | max); | ||
82 | (*agc)--; | 82 | (*agc)--; |
83 | return ret; | 83 | return ret; |
84 | } | 84 | } |