summaryrefslogtreecommitdiff
path: root/src/testbed/testbed_api_statistics.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-10-06 20:55:28 +0000
committerChristian Grothoff <christian@grothoff.org>2013-10-06 20:55:28 +0000
commit61c39c60565b386e0e12ea669556b030e8cd7180 (patch)
tree59109aeab8297bdc996faca8c4e38ec7426c36cf /src/testbed/testbed_api_statistics.c
parent780eb09dd8040ecf8649d40ddf8314464e0fc48e (diff)
downloadgnunet-61c39c60565b386e0e12ea669556b030e8cd7180.tar.gz
gnunet-61c39c60565b386e0e12ea669556b030e8cd7180.zip
-remove trailing whitespace
Diffstat (limited to 'src/testbed/testbed_api_statistics.c')
-rw-r--r--src/testbed/testbed_api_statistics.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/testbed/testbed_api_statistics.c b/src/testbed/testbed_api_statistics.c
index dbbb99e4a..5fa0750e3 100644
--- a/src/testbed/testbed_api_statistics.c
+++ b/src/testbed/testbed_api_statistics.c
@@ -95,7 +95,7 @@ struct GetStatsContext
95 * The task for calling the continuation callback 95 * The task for calling the continuation callback
96 */ 96 */
97 GNUNET_SCHEDULER_TaskIdentifier call_completion_task_id; 97 GNUNET_SCHEDULER_TaskIdentifier call_completion_task_id;
98 98
99 /** 99 /**
100 * The number of peers present in the peers array. This number also 100 * The number of peers present in the peers array. This number also
101 * represents the number of service connect operations in the ops array 101 * represents the number of service connect operations in the ops array
@@ -180,7 +180,7 @@ op_done_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
180 180
181 sc = peer_sc->sc; 181 sc = peer_sc->sc;
182 peer_sc->op_done_task_id = GNUNET_SCHEDULER_NO_TASK; 182 peer_sc->op_done_task_id = GNUNET_SCHEDULER_NO_TASK;
183 op = &sc->ops[peer_sc->peer_index]; 183 op = &sc->ops[peer_sc->peer_index];
184 GNUNET_assert (NULL != *op); 184 GNUNET_assert (NULL != *op);
185 GNUNET_TESTBED_operation_done (*op); 185 GNUNET_TESTBED_operation_done (*op);
186 *op = NULL; 186 *op = NULL;
@@ -202,7 +202,7 @@ iteration_completion_cb (void *cls, int success)
202 202
203 GNUNET_break (GNUNET_OK == success); 203 GNUNET_break (GNUNET_OK == success);
204 sc = peer_sc->sc; 204 sc = peer_sc->sc;
205 peer_sc->get_handle = NULL; 205 peer_sc->get_handle = NULL;
206 sc->num_completed++; 206 sc->num_completed++;
207 peer_sc->op_done_task_id = GNUNET_SCHEDULER_add_now (&op_done_task, peer_sc); 207 peer_sc->op_done_task_id = GNUNET_SCHEDULER_add_now (&op_done_task, peer_sc);
208 if (sc->num_completed == sc->num_peers) 208 if (sc->num_completed == sc->num_peers)
@@ -239,7 +239,7 @@ iterator_cb (void *cls, const char *subsystem,
239 LOG_DEBUG ("Peer %u: [%s,%s] -> %lu\n", peer_sc->peer_index, 239 LOG_DEBUG ("Peer %u: [%s,%s] -> %lu\n", peer_sc->peer_index,
240 subsystem, name, (unsigned long) value); 240 subsystem, name, (unsigned long) value);
241 ret = sc->proc (sc->cb_cls, peer, 241 ret = sc->proc (sc->cb_cls, peer,
242 subsystem, name, value, is_persistent); 242 subsystem, name, value, is_persistent);
243 if (GNUNET_SYSERR == ret) 243 if (GNUNET_SYSERR == ret)
244 LOG_DEBUG ("Aborting iteration for peer %u\n", peer_sc->peer_index); 244 LOG_DEBUG ("Aborting iteration for peer %u\n", peer_sc->peer_index);
245 return ret; 245 return ret;
@@ -283,11 +283,11 @@ service_connect_comp (void *cls,
283 * from GNUNET_TESTBED_service_connect() 283 * from GNUNET_TESTBED_service_connect()
284 * @return service handle to return in 'op_result', NULL on error 284 * @return service handle to return in 'op_result', NULL on error
285 */ 285 */
286static void * 286static void *
287statistics_ca (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg) 287statistics_ca (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg)
288{ 288{
289 struct PeerGetStatsContext *peer_sc = cls; 289 struct PeerGetStatsContext *peer_sc = cls;
290 290
291 LOG_DEBUG ("Connecting to statistics service of peer %u\n", 291 LOG_DEBUG ("Connecting to statistics service of peer %u\n",
292 peer_sc->peer_index); 292 peer_sc->peer_index);
293 return GNUNET_STATISTICS_create ("<testbed-api>", cfg); 293 return GNUNET_STATISTICS_create ("<testbed-api>", cfg);
@@ -300,7 +300,7 @@ statistics_ca (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg)
300 * @param cls the PeerGetStatsContext 300 * @param cls the PeerGetStatsContext
301 * @param op_result service handle returned from the connect adapter 301 * @param op_result service handle returned from the connect adapter
302 */ 302 */
303static void 303static void
304statistics_da (void *cls, void *op_result) 304statistics_da (void *cls, void *op_result)
305{ 305{
306 struct PeerGetStatsContext *peer_sc = cls; 306 struct PeerGetStatsContext *peer_sc = cls;
@@ -331,7 +331,7 @@ opstart_get_stats (void *cls)
331 unsigned int peer; 331 unsigned int peer;
332 332
333 LOG_DEBUG ("Starting get_statistics operation\n"); 333 LOG_DEBUG ("Starting get_statistics operation\n");
334 sc->ops = GNUNET_malloc (sc->num_peers * 334 sc->ops = GNUNET_malloc (sc->num_peers *
335 sizeof (struct GNUNET_TESTBED_Operation *)); 335 sizeof (struct GNUNET_TESTBED_Operation *));
336 for (peer = 0; peer < sc->num_peers; peer++) 336 for (peer = 0; peer < sc->num_peers; peer++)
337 { 337 {
@@ -343,7 +343,7 @@ opstart_get_stats (void *cls)
343 peer_sc = GNUNET_malloc (sizeof (struct PeerGetStatsContext)); 343 peer_sc = GNUNET_malloc (sizeof (struct PeerGetStatsContext));
344 peer_sc->sc = sc; 344 peer_sc->sc = sc;
345 peer_sc->peer_index = peer; 345 peer_sc->peer_index = peer;
346 sc->ops[peer] = 346 sc->ops[peer] =
347 GNUNET_TESTBED_service_connect (sc, sc->peers[peer], "statistics", 347 GNUNET_TESTBED_service_connect (sc, sc->peers[peer], "statistics",
348 &service_connect_comp, 348 &service_connect_comp,
349 peer_sc, 349 peer_sc,
@@ -364,7 +364,7 @@ oprelease_get_stats (void *cls)
364{ 364{
365 struct GetStatsContext *sc = cls; 365 struct GetStatsContext *sc = cls;
366 unsigned int peer; 366 unsigned int peer;
367 367
368 LOG_DEBUG ("Cleaning up get_statistics operation\n"); 368 LOG_DEBUG ("Cleaning up get_statistics operation\n");
369 if (GNUNET_SCHEDULER_NO_TASK != sc->call_completion_task_id) 369 if (GNUNET_SCHEDULER_NO_TASK != sc->call_completion_task_id)
370 GNUNET_SCHEDULER_cancel (sc->call_completion_task_id); 370 GNUNET_SCHEDULER_cancel (sc->call_completion_task_id);
@@ -383,7 +383,7 @@ oprelease_get_stats (void *cls)
383 GNUNET_free_non_null (sc->subsystem); 383 GNUNET_free_non_null (sc->subsystem);
384 GNUNET_free_non_null (sc->name); 384 GNUNET_free_non_null (sc->name);
385 GNUNET_free (sc); 385 GNUNET_free (sc);
386 if (GNUNET_YES == 386 if (GNUNET_YES ==
387 GNUNET_TESTBED_operation_queue_destroy_empty_ (no_wait_queue)) 387 GNUNET_TESTBED_operation_queue_destroy_empty_ (no_wait_queue))
388 no_wait_queue = NULL; 388 no_wait_queue = NULL;
389} 389}
@@ -415,7 +415,7 @@ GNUNET_TESTBED_get_statistics (unsigned int num_peers,
415 GNUNET_assert (NULL != proc); 415 GNUNET_assert (NULL != proc);
416 GNUNET_assert (NULL != cont); 416 GNUNET_assert (NULL != cont);
417 if (NULL == no_wait_queue) 417 if (NULL == no_wait_queue)
418 no_wait_queue = GNUNET_TESTBED_operation_queue_create_ 418 no_wait_queue = GNUNET_TESTBED_operation_queue_create_
419 (OPERATION_QUEUE_TYPE_FIXED, UINT_MAX); 419 (OPERATION_QUEUE_TYPE_FIXED, UINT_MAX);
420 sc = GNUNET_malloc (sizeof (struct GetStatsContext)); 420 sc = GNUNET_malloc (sizeof (struct GetStatsContext));
421 sc->peers = peers; 421 sc->peers = peers;