diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-11-15 19:05:44 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-11-15 19:05:44 +0000 |
commit | b1744b33000722f5185df1e5a056206a3df5147b (patch) | |
tree | fc360c758dca904e62d0068e24bc20d34d930aff /src | |
parent | 74f48ce6ec8e72c96030969491dd412117a4c189 (diff) | |
download | gnunet-b1744b33000722f5185df1e5a056206a3df5147b.tar.gz gnunet-b1744b33000722f5185df1e5a056206a3df5147b.zip |
not sure how this has been working, unless something got out of sync in svn... also not sure it is fixed
Diffstat (limited to 'src')
-rw-r--r-- | src/testing/testing.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/testing/testing.c b/src/testing/testing.c index fed3d87df..ecf2a2591 100644 --- a/src/testing/testing.c +++ b/src/testing/testing.c | |||
@@ -1479,13 +1479,14 @@ send_hello(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1479 | ctx->hello_send_task = GNUNET_SCHEDULER_NO_TASK; | 1479 | ctx->hello_send_task = GNUNET_SCHEDULER_NO_TASK; |
1480 | if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) | 1480 | if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) |
1481 | return; | 1481 | return; |
1482 | if ((ctx->d1->hello != NULL) && (NULL != GNUNET_HELLO_get_header(ctx->d1->hello))) | 1482 | if ((ctx->d2->hello != NULL) && (NULL != GNUNET_HELLO_get_header(ctx->d2->hello))) |
1483 | { | 1483 | { |
1484 | hello = GNUNET_HELLO_get_header(ctx->d1->hello); | 1484 | hello = GNUNET_HELLO_get_header(ctx->d2->hello); |
1485 | GNUNET_assert(hello != NULL); | 1485 | GNUNET_assert(hello != NULL); |
1486 | /* FIXME: if this works, change d2th to d1th */ | ||
1486 | GNUNET_TRANSPORT_offer_hello (ctx->d2th, hello); | 1487 | GNUNET_TRANSPORT_offer_hello (ctx->d2th, hello); |
1487 | 1488 | GNUNET_assert(ctx->d1core != NULL); | |
1488 | ctx->connect_request_handle = GNUNET_CORE_peer_request_connect (ctx->d2->server, | 1489 | ctx->connect_request_handle = GNUNET_CORE_peer_request_connect (ctx->d1core, |
1489 | GNUNET_TIME_relative_divide(ctx->relative_timeout, | 1490 | GNUNET_TIME_relative_divide(ctx->relative_timeout, |
1490 | ctx->max_connect_attempts + 1), | 1491 | ctx->max_connect_attempts + 1), |
1491 | &ctx->d1->id, | 1492 | &ctx->d1->id, |
@@ -1594,9 +1595,9 @@ GNUNET_TESTING_daemons_connect (struct GNUNET_TESTING_Daemon *d1, | |||
1594 | 1595 | ||
1595 | #endif | 1596 | #endif |
1596 | 1597 | ||
1597 | ctx->d2th = GNUNET_TRANSPORT_connect (d2->cfg, | 1598 | ctx->d2th = GNUNET_TRANSPORT_connect (d1->cfg, |
1598 | &d2->id, | 1599 | &d1->id, |
1599 | d2, NULL, NULL, NULL); | 1600 | d1, NULL, NULL, NULL); |
1600 | if (ctx->d2th == NULL) | 1601 | if (ctx->d2th == NULL) |
1601 | { | 1602 | { |
1602 | GNUNET_CORE_disconnect(ctx->d1core); | 1603 | GNUNET_CORE_disconnect(ctx->d1core); |
@@ -1649,9 +1650,9 @@ reattempt_daemons_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext | |||
1649 | return; | 1650 | return; |
1650 | } | 1651 | } |
1651 | 1652 | ||
1652 | ctx->d2th = GNUNET_TRANSPORT_connect (ctx->d2->cfg, | 1653 | ctx->d2th = GNUNET_TRANSPORT_connect (ctx->d1->cfg, |
1653 | &ctx->d2->id, | 1654 | &ctx->d1->id, |
1654 | ctx->d2, NULL, NULL, NULL); | 1655 | ctx->d1, NULL, NULL, NULL); |
1655 | if (ctx->d2th == NULL) | 1656 | if (ctx->d2th == NULL) |
1656 | { | 1657 | { |
1657 | GNUNET_CORE_disconnect(ctx->d1core); | 1658 | GNUNET_CORE_disconnect(ctx->d1core); |