diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-09-04 10:28:11 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-09-04 10:28:11 +0000 |
commit | 6aa5d954612d1156bbc2375eb1d6e3ce8b98a41e (patch) | |
tree | 14a40c5f1365f8abf3e0c53a1e666a3294b53222 /src/testbed | |
parent | 2d0aa8253af4a09896597924356e0663007e205a (diff) | |
download | gnunet-6aa5d954612d1156bbc2375eb1d6e3ce8b98a41e.tar.gz gnunet-6aa5d954612d1156bbc2375eb1d6e3ce8b98a41e.zip |
sane logging and code
Diffstat (limited to 'src/testbed')
-rw-r--r-- | src/testbed/gnunet-service-testbed.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/testbed/gnunet-service-testbed.c b/src/testbed/gnunet-service-testbed.c index 9abf6bfd5..3a4cd0375 100644 --- a/src/testbed/gnunet-service-testbed.c +++ b/src/testbed/gnunet-service-testbed.c | |||
@@ -2044,8 +2044,9 @@ overlay_connect_notify (void *cls, const struct GNUNET_PeerIdentity *new_peer, | |||
2044 | GNUNET_free (other_peer_str); | 2044 | GNUNET_free (other_peer_str); |
2045 | return; | 2045 | return; |
2046 | } | 2046 | } |
2047 | LOG_DEBUG ("Peer %4s connected to peer %4s\n", new_peer_str, other_peer_str); | ||
2048 | GNUNET_free (new_peer_str); | 2047 | GNUNET_free (new_peer_str); |
2048 | LOG_DEBUG ("Peer %4s connected to peer %4s\n", other_peer_str, | ||
2049 | GNUNET_i2s (&occ->peer_identity)); | ||
2049 | GNUNET_free (other_peer_str); | 2050 | GNUNET_free (other_peer_str); |
2050 | if (GNUNET_SCHEDULER_NO_TASK != occ->send_hello_task) | 2051 | if (GNUNET_SCHEDULER_NO_TASK != occ->send_hello_task) |
2051 | { | 2052 | { |
@@ -2193,17 +2194,15 @@ core_startup_cb (void *cls, struct GNUNET_CORE_Handle *server, | |||
2193 | if ((NULL == occ->p1th) || (NULL == occ->p2th)) | 2194 | if ((NULL == occ->p1th) || (NULL == occ->p2th)) |
2194 | { | 2195 | { |
2195 | occ->emsg = GNUNET_strdup ("Cannot connect to TRANSPORTs of peers"); | 2196 | occ->emsg = GNUNET_strdup ("Cannot connect to TRANSPORTs of peers"); |
2196 | goto send_failure; | 2197 | GNUNET_SCHEDULER_cancel (occ->timeout_task); |
2198 | occ->timeout_task = GNUNET_SCHEDULER_add_now (&timeout_overlay_connect, | ||
2199 | occ); | ||
2200 | return; | ||
2197 | } | 2201 | } |
2198 | LOG_DEBUG ("Acquiring HELLO of peer %s\n", | 2202 | LOG_DEBUG ("Acquiring HELLO of peer %s\n", |
2199 | GNUNET_i2s (&occ->other_peer_identity)); | 2203 | GNUNET_i2s (&occ->other_peer_identity)); |
2200 | occ->emsg = GNUNET_strdup ("Timeout while acquiring HELLO message"); | 2204 | occ->emsg = GNUNET_strdup ("Timeout while acquiring HELLO message"); |
2201 | occ->ghh = GNUNET_TRANSPORT_get_hello (occ->p2th, &hello_update_cb, occ); | 2205 | occ->ghh = GNUNET_TRANSPORT_get_hello (occ->p2th, &hello_update_cb, occ); |
2202 | return; | ||
2203 | |||
2204 | send_failure: | ||
2205 | GNUNET_SCHEDULER_cancel (occ->timeout_task); | ||
2206 | occ->timeout_task = GNUNET_SCHEDULER_add_now (&timeout_overlay_connect, occ); | ||
2207 | } | 2206 | } |
2208 | 2207 | ||
2209 | 2208 | ||