X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fdv%2Ftest_transport_api_dv.c;h=39dd08877db643700a50cc0bc104b3ef68985ad2;hb=19377520016cc644070d207af34ae3e76618fdc8;hp=c37448342cb563b8b14db99df41f57d8e3ba7e0b;hpb=0bb2e2d462b67cc2c6372de8b524f23245ab8926;p=oweals%2Fgnunet.git diff --git a/src/dv/test_transport_api_dv.c b/src/dv/test_transport_api_dv.c index c37448342..39dd08877 100644 --- a/src/dv/test_transport_api_dv.c +++ b/src/dv/test_transport_api_dv.c @@ -525,6 +525,7 @@ static void connect_notify_peer2 (void *cls, GNUNET_i2s(&pos->peer2->id), GNUNET_h2s (&peer->hashPubKey)); #endif if (NULL == GNUNET_CORE_notify_transmit_ready (pos->peer1handle, + GNUNET_YES, 0, TIMEOUT, &pos->peer2->id, @@ -547,9 +548,9 @@ static void connect_notify_peer2 (void *cls, static void init_notify_peer2 (void *cls, - struct GNUNET_CORE_Handle *server, - const struct GNUNET_PeerIdentity *my_identity, - const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey) + struct GNUNET_CORE_Handle *server, + const struct GNUNET_PeerIdentity *my_identity, + const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey) { #if VERBOSE GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, @@ -597,9 +598,9 @@ static void connect_notify_peer1 (void *cls, static void init_notify_peer1 (void *cls, - struct GNUNET_CORE_Handle *server, - const struct GNUNET_PeerIdentity *my_identity, - const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey) + struct GNUNET_CORE_Handle *server, + const struct GNUNET_PeerIdentity *my_identity, + const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey) { total_server_connections++; #if VERBOSE @@ -615,7 +616,7 @@ send_test_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc) { struct TestMessageContext *pos = cls; - if ((tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) || (cls == NULL)) + if (( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) || (cls == NULL)) return; if (die_task == GNUNET_SCHEDULER_NO_TASK) @@ -818,7 +819,13 @@ connect_topology () expected_connections = -1; if ((pg != NULL) && (peers_left == 0)) { - expected_connections = GNUNET_TESTING_connect_topology (pg, connection_topology, connect_topology_option, connect_topology_option_modifier, NULL, NULL); + expected_connections = GNUNET_TESTING_connect_topology (pg, + connection_topology, + connect_topology_option, + connect_topology_option_modifier, + TIMEOUT, + 12, + NULL, NULL); #if VERBOSE GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Have %d expected connections\n", expected_connections); @@ -877,6 +884,10 @@ static void all_connect_handler (void *cls, struct TestMessageContext *temp_context; #endif uint32_t distance; + + if (0 == memcmp(&d->id, peer, sizeof(struct GNUNET_PeerIdentity))) + return; + distance = get_atsi_distance(atsi); #if VERBOSE @@ -1128,8 +1139,17 @@ run (void *cls, peer_daemon_hash = GNUNET_CONTAINER_multihashmap_create(peers_left); pg = GNUNET_TESTING_daemons_start (cfg, - peers_left, TIMEOUT, &hostkey_callback, NULL, &peers_started_callback, NULL, - &topology_callback, NULL, NULL); + peers_left, /* Total number of peers */ + peers_left, /* Number of outstanding connections */ + peers_left, /* Number of parallel ssh connections, or peers being started at once */ + TIMEOUT, + &hostkey_callback, + NULL, + &peers_started_callback, + NULL, + &topology_callback, + NULL, + NULL); }