diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-08-15 21:54:06 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-08-15 21:54:06 +0000 |
commit | 5746309cb4be2073d550ad7a6885e918631dbc38 (patch) | |
tree | 89455bc4aadf977816b38df13f990372cd81d71a /src/transport/gnunet-service-transport_hello.c | |
parent | 6fd3e715cae09fa6e657c96f1c6f9711ee51f42f (diff) | |
download | gnunet-5746309cb4be2073d550ad7a6885e918631dbc38.tar.gz gnunet-5746309cb4be2073d550ad7a6885e918631dbc38.zip |
indentation
Diffstat (limited to 'src/transport/gnunet-service-transport_hello.c')
-rw-r--r-- | src/transport/gnunet-service-transport_hello.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/src/transport/gnunet-service-transport_hello.c b/src/transport/gnunet-service-transport_hello.c index a2d0d966c..3c51c5df2 100644 --- a/src/transport/gnunet-service-transport_hello.c +++ b/src/transport/gnunet-service-transport_hello.c | |||
@@ -141,10 +141,10 @@ address_generator (void *cls, size_t max, void *buf) | |||
141 | 141 | ||
142 | if (NULL == gc->addr_pos) | 142 | if (NULL == gc->addr_pos) |
143 | return 0; | 143 | return 0; |
144 | ret = GNUNET_HELLO_add_address (gc->addr_pos->plugin_name, | 144 | ret = |
145 | gc->expiration, | 145 | GNUNET_HELLO_add_address (gc->addr_pos->plugin_name, gc->expiration, |
146 | &gc->addr_pos[1], | 146 | &gc->addr_pos[1], gc->addr_pos->addrlen, buf, |
147 | gc->addr_pos->addrlen, buf, max); | 147 | max); |
148 | gc->addr_pos = gc->addr_pos->next; | 148 | gc->addr_pos = gc->addr_pos->next; |
149 | return ret; | 149 | return ret; |
150 | } | 150 | } |
@@ -173,15 +173,14 @@ refresh_hello_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
173 | "Refreshed my `%s', new size is %d\n", "HELLO", | 173 | "Refreshed my `%s', new size is %d\n", "HELLO", |
174 | GNUNET_HELLO_size (our_hello)); | 174 | GNUNET_HELLO_size (our_hello)); |
175 | #endif | 175 | #endif |
176 | GNUNET_STATISTICS_update (GST_stats, | 176 | GNUNET_STATISTICS_update (GST_stats, gettext_noop ("# refreshed my HELLO"), 1, |
177 | gettext_noop ("# refreshed my HELLO"), | 177 | GNUNET_NO); |
178 | 1, GNUNET_NO); | ||
179 | if (NULL != hello_cb) | 178 | if (NULL != hello_cb) |
180 | hello_cb (hello_cb_cls, GST_hello_get ()); | 179 | hello_cb (hello_cb_cls, GST_hello_get ()); |
181 | GNUNET_PEERINFO_add_peer (GST_peerinfo, our_hello); | 180 | GNUNET_PEERINFO_add_peer (GST_peerinfo, our_hello); |
182 | hello_task | 181 | hello_task = |
183 | = GNUNET_SCHEDULER_add_delayed (HELLO_REFRESH_PERIOD, | 182 | GNUNET_SCHEDULER_add_delayed (HELLO_REFRESH_PERIOD, &refresh_hello_task, |
184 | &refresh_hello_task, NULL); | 183 | NULL); |
185 | 184 | ||
186 | } | 185 | } |
187 | 186 | ||
@@ -257,8 +256,7 @@ GST_hello_get () | |||
257 | * @param plugin_address_len number of bytes in plugin_address | 256 | * @param plugin_address_len number of bytes in plugin_address |
258 | */ | 257 | */ |
259 | void | 258 | void |
260 | GST_hello_modify_addresses (int addremove, | 259 | GST_hello_modify_addresses (int addremove, const char *plugin_name, |
261 | const char *plugin_name, | ||
262 | const void *plugin_address, | 260 | const void *plugin_address, |
263 | size_t plugin_address_len) | 261 | size_t plugin_address_len) |
264 | { | 262 | { |
@@ -266,9 +264,9 @@ GST_hello_modify_addresses (int addremove, | |||
266 | 264 | ||
267 | #if DEBUG_TRANSPORT | 265 | #if DEBUG_TRANSPORT |
268 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 266 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
269 | (add_remove == GNUNET_YES) | 267 | (add_remove == |
270 | ? "Adding `%s':%s to the set of our addresses\n" | 268 | GNUNET_YES) ? "Adding `%s':%s to the set of our addresses\n" : |
271 | : "Removing `%s':%s from the set of our addresses\n", | 269 | "Removing `%s':%s from the set of our addresses\n", |
272 | GST_plugins_a2s (plugin_name, addr, addrlen), p->short_name); | 270 | GST_plugins_a2s (plugin_name, addr, addrlen), p->short_name); |
273 | #endif | 271 | #endif |
274 | GNUNET_assert (plugin_address != NULL); | 272 | GNUNET_assert (plugin_address != NULL); |
@@ -311,8 +309,7 @@ GST_hello_modify_addresses (int addremove, | |||
311 | * GNUNET_NO if not | 309 | * GNUNET_NO if not |
312 | */ | 310 | */ |
313 | int | 311 | int |
314 | GST_hello_test_address (const char *plugin_name, | 312 | GST_hello_test_address (const char *plugin_name, const void *plugin_address, |
315 | const void *plugin_address, | ||
316 | size_t plugin_address_len, | 313 | size_t plugin_address_len, |
317 | struct GNUNET_CRYPTO_RsaSignature **sig, | 314 | struct GNUNET_CRYPTO_RsaSignature **sig, |
318 | struct GNUNET_TIME_Absolute **sig_expiration) | 315 | struct GNUNET_TIME_Absolute **sig_expiration) |