aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing.c')
-rw-r--r--src/testing/testing.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/testing/testing.c b/src/testing/testing.c
index 9ba58de61..d7f6946b0 100644
--- a/src/testing/testing.c
+++ b/src/testing/testing.c
@@ -65,8 +65,7 @@ static struct GNUNET_CORE_MessageHandler no_handlers[] = { {NULL, 0, 0} };
65 65
66#if EMPTY_HACK 66#if EMPTY_HACK
67static int 67static int
68test_address (void *cls, 68test_address (void *cls, const struct GNUNET_HELLO_Address *address,
69 const struct GNUNET_HELLO_Address *address,
70 struct GNUNET_TIME_Absolute expiration) 69 struct GNUNET_TIME_Absolute expiration)
71{ 70{
72 int *empty = cls; 71 int *empty = cls;
@@ -108,7 +107,7 @@ process_hello (void *cls, const struct GNUNET_MessageHeader *message)
108#endif 107#endif
109 GNUNET_assert (daemon->phase == SP_GET_HELLO || 108 GNUNET_assert (daemon->phase == SP_GET_HELLO ||
110 daemon->phase == SP_START_DONE); 109 daemon->phase == SP_START_DONE);
111 daemon->cb = NULL; // FIXME: why??? (see fsm:SP_START_CORE, notify_daemon_started) 110 daemon->cb = NULL; // FIXME: why??? (see fsm:SP_START_CORE, notify_daemon_started)
112 if (daemon->task != GNUNET_SCHEDULER_NO_TASK) /* Assertion here instead? */ 111 if (daemon->task != GNUNET_SCHEDULER_NO_TASK) /* Assertion here instead? */
113 GNUNET_SCHEDULER_cancel (daemon->task); 112 GNUNET_SCHEDULER_cancel (daemon->task);
114 113
@@ -551,9 +550,9 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
551 GNUNET_free_non_null (d->username); 550 GNUNET_free_non_null (d->username);
552 GNUNET_free (d->proc); 551 GNUNET_free (d->proc);
553// GNUNET_free (d); // FIXME (could this leak) 552// GNUNET_free (d); // FIXME (could this leak)
554 d->hostname = NULL; // Quick hack to avoid crashing (testing need to be 553 d->hostname = NULL; // Quick hack to avoid crashing (testing need to be
555 d->cfg = NULL; // overhauled anyway, and the error managing is 554 d->cfg = NULL; // overhauled anyway, and the error managing is
556 // pretty broken anyway. 555 // pretty broken anyway.
557 return; 556 return;
558 } 557 }
559 /* wait some more */ 558 /* wait some more */
@@ -2037,8 +2036,7 @@ reattempt_daemons_connect (void *cls,
2037 if (NULL != ctx->d2->hello) 2036 if (NULL != ctx->d2->hello)
2038 { 2037 {
2039#if DEBUG_TESTING_RECONNECT 2038#if DEBUG_TESTING_RECONNECT
2040 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2039 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "updating %s's HELLO\n",
2041 "updating %s's HELLO\n",
2042 ctx->d2->shortname); 2040 ctx->d2->shortname);
2043#endif 2041#endif
2044 GNUNET_free (ctx->d2->hello); 2042 GNUNET_free (ctx->d2->hello);
@@ -2059,8 +2057,7 @@ reattempt_daemons_connect (void *cls,
2059#if DEBUG_TESTING_RECONNECT 2057#if DEBUG_TESTING_RECONNECT
2060 else 2058 else
2061 { 2059 {
2062 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2060 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "didn't have %s's HELLO\n",
2063 "didn't have %s's HELLO\n",
2064 ctx->d2->shortname); 2061 ctx->d2->shortname);
2065 } 2062 }
2066#endif 2063#endif
@@ -2103,8 +2100,7 @@ reattempt_daemons_connect (void *cls,
2103 if (ctx->send_hello == GNUNET_YES) 2100 if (ctx->send_hello == GNUNET_YES)
2104 { 2101 {
2105#if DEBUG_TESTING_RECONNECT 2102#if DEBUG_TESTING_RECONNECT
2106 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2103 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending %s's HELLO to %s\n",
2107 "Sending %s's HELLO to %s\n",
2108 ctx->d1->shortname, ctx->d2->shortname); 2104 ctx->d1->shortname, ctx->d2->shortname);
2109#endif 2105#endif
2110 ctx->d1th = 2106 ctx->d1th =
@@ -2126,8 +2122,7 @@ reattempt_daemons_connect (void *cls,
2126 else 2122 else
2127 { 2123 {
2128#if DEBUG_TESTING_RECONNECT 2124#if DEBUG_TESTING_RECONNECT
2129 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2125 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Trying to reconnect %s to %s\n",
2130 "Trying to reconnect %s to %s\n",
2131 ctx->d1->shortname, ctx->d2->shortname); 2126 ctx->d1->shortname, ctx->d2->shortname);
2132#endif 2127#endif
2133 GNUNET_TRANSPORT_try_connect (ctx->d1th, &ctx->d2->id); 2128 GNUNET_TRANSPORT_try_connect (ctx->d1th, &ctx->d2->id);