diff options
author | grothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96> | 2011-09-14 11:59:46 +0000 |
---|---|---|
committer | grothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96> | 2011-09-14 11:59:46 +0000 |
commit | fb4162cf95ab0306a9be2380474cc7dc97040d41 (patch) | |
tree | 3db4e42adb872d1e8aa792643c341a14b2959736 /src/topology | |
parent | 81d685310e013a57b2c42017c8b9b177b9d8194d (diff) |
indentation
git-svn-id: https://gnunet.org/svn/gnunet@16833 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/topology')
-rw-r--r-- | src/topology/test_gnunet_daemon_topology.c | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/src/topology/test_gnunet_daemon_topology.c b/src/topology/test_gnunet_daemon_topology.c index 6d3645f017..49990788a9 100644 --- a/src/topology/test_gnunet_daemon_topology.c +++ b/src/topology/test_gnunet_daemon_topology.c @@ -81,14 +81,14 @@ clean_up_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { unsigned int i; - for (i=0;i<NUM_PEERS;i++) + for (i = 0; i < NUM_PEERS; i++) + { + if (NULL != cc[i]) { - if (NULL != cc[i]) - { - GNUNET_TESTING_daemons_connect_cancel (cc[i]); - cc[i] = NULL; - } + GNUNET_TESTING_daemons_connect_cancel (cc[i]); + cc[i] = NULL; } + } GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); ok = 0; } @@ -111,12 +111,12 @@ notify_connect_complete (void *cls, const struct GNUNET_PeerIdentity *first, if (NULL != emsg) { fprintf (stderr, "Failed to connect two peers: %s\n", emsg); - for (i=0;i<NUM_PEERS;i++) + for (i = 0; i < NUM_PEERS; i++) if (NULL != cc[i]) - { - GNUNET_TESTING_daemons_connect_cancel (cc[i]); - cc[i] = NULL; - } + { + GNUNET_TESTING_daemons_connect_cancel (cc[i]); + cc[i] = NULL; + } GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); GNUNET_assert (0); return; @@ -145,13 +145,17 @@ my_cb (void *cls, const struct GNUNET_PeerIdentity *id, last = d; return; } - cc[peers_left] = GNUNET_TESTING_daemons_connect (last, d, TIMEOUT, CONNECT_ATTEMPTS, - GNUNET_YES, ¬ify_connect_complete, &cc[peers_left]); + cc[peers_left] = + GNUNET_TESTING_daemons_connect (last, d, TIMEOUT, CONNECT_ATTEMPTS, + GNUNET_YES, ¬ify_connect_complete, + &cc[peers_left]); if (peers_left == 0) { /* close circle */ - cc[NUM_PEERS-1] = GNUNET_TESTING_daemons_connect (d, first, TIMEOUT, CONNECT_ATTEMPTS, - GNUNET_YES, ¬ify_connect_complete, &cc[NUM_PEERS-1]); + cc[NUM_PEERS - 1] = + GNUNET_TESTING_daemons_connect (d, first, TIMEOUT, CONNECT_ATTEMPTS, + GNUNET_YES, ¬ify_connect_complete, + &cc[NUM_PEERS - 1]); } } |