summaryrefslogtreecommitdiff
path: root/src/transport/test_transport_api.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2011-10-09 08:55:21 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2011-10-09 08:55:21 +0000
commitc8e34e6d2b1aa3c22e7033f385e2408b8177af8f (patch)
tree6c04beae50e4ad849f9c199637d9c660b5d96c77 /src/transport/test_transport_api.c
parent9565c4b88a244db6726e56d1c48e8501d8c057f4 (diff)
double testing done
Diffstat (limited to 'src/transport/test_transport_api.c')
-rw-r--r--src/transport/test_transport_api.c52
1 files changed, 1 insertions, 51 deletions
diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c
index 49e160ddb..d0159927e 100644
--- a/src/transport/test_transport_api.c
+++ b/src/transport/test_transport_api.c
@@ -38,7 +38,6 @@
#include "transport-testing.h"
#define VERBOSE GNUNET_EXTRA_LOGGING
-
#define VERBOSE_ARM GNUNET_EXTRA_LOGGING
#define START_ARM GNUNET_YES
@@ -92,55 +91,7 @@ static void
end ()
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n");
-#if 0
-static void
-get_hello_p2 (void *cb_cls, const struct GNUNET_MessageHeader *message);
-
-static void
-get_hello_p1 (void *cb_cls, const struct GNUNET_MessageHeader *message);
-
-static void
-notify_connect_internal (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_TRANSPORT_ATS_Information *ats,
- uint32_t ats_count)
-{
- struct ConnectingContext *cc = cls;
-
- GNUNET_assert (cc != NULL);
- if (0 ==
- memcmp (&(*peer).hashPubKey, &cc->p1->id.hashPubKey,
- sizeof (GNUNET_HashCode)))
- {
- if (cc->p1_c == GNUNET_NO)
- cc->p1_c = GNUNET_YES;
- }
- if (0 ==
- memcmp (&(*peer).hashPubKey, &cc->p2->id.hashPubKey,
- sizeof (GNUNET_HashCode)))
- {
- if (cc->p2_c == GNUNET_NO)
- cc->p2_c = GNUNET_YES;
- }
-
- if ((cc->p2_c == GNUNET_YES) && (cc->p2_c == GNUNET_YES))
- {
- /* clean up */
- if (cc->tct != GNUNET_SCHEDULER_NO_TASK)
- GNUNET_SCHEDULER_cancel (cc->tct);
-
- cc->tct = GNUNET_SCHEDULER_NO_TASK;
-
- GNUNET_TRANSPORT_disconnect (cc->th_p1);
- GNUNET_TRANSPORT_disconnect (cc->th_p2);
-
- if (cc->cb != NULL)
- cc->cb (cc->p1, cc->p2, cc->cb_cls);
-
- GNUNET_free (cc);
- }
-}
-#endif
if (send_task != GNUNET_SCHEDULER_NO_TASK)
GNUNET_SCHEDULER_cancel (send_task);
@@ -170,6 +121,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Fail! Could not connect peers\n"));
GNUNET_TRANSPORT_TESTING_connect_peers_cancel (tth, cc);
+ cc = NULL;
}
if (th != NULL)
@@ -181,8 +133,6 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
if (p2 != NULL)
GNUNET_TRANSPORT_TESTING_stop_peer (tth, p2);
- GNUNET_TRANSPORT_TESTING_done (tth);
-
ok = GNUNET_SYSERR;
}