aboutsummaryrefslogtreecommitdiff
path: root/src/transport/transport_api_cmd_connecting_peers_v3.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/transport_api_cmd_connecting_peers_v3.c')
-rw-r--r--src/transport/transport_api_cmd_connecting_peers_v3.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/transport/transport_api_cmd_connecting_peers_v3.c b/src/transport/transport_api_cmd_connecting_peers_v3.c
index e90781637..a73d81064 100644
--- a/src/transport/transport_api_cmd_connecting_peers_v3.c
+++ b/src/transport/transport_api_cmd_connecting_peers_v3.c
@@ -94,6 +94,8 @@ struct ConnectPeersState
94 */ 94 */
95 struct GNUNET_TESTING_NodeConnection *node_connections_head; 95 struct GNUNET_TESTING_NodeConnection *node_connections_head;
96 96
97 struct GNUNET_TESTING_Interpreter *is;
98
97 /** 99 /**
98 * Number of connections. 100 * Number of connections.
99 */ 101 */
@@ -264,6 +266,7 @@ calculate_num (struct GNUNET_TESTING_NodeConnection *node_connection,
264 return num; 266 return num;
265} 267}
266 268
269
267static char * 270static char *
268get_address (struct GNUNET_TESTING_NodeConnection *connection, 271get_address (struct GNUNET_TESTING_NodeConnection *connection,
269 char *prefix) 272 char *prefix)
@@ -323,7 +326,6 @@ get_address (struct GNUNET_TESTING_NodeConnection *connection,
323 */ 326 */
324static void 327static void
325connect_peers_run (void *cls, 328connect_peers_run (void *cls,
326 const struct GNUNET_TESTING_Command *cmd,
327 struct GNUNET_TESTING_Interpreter *is) 329 struct GNUNET_TESTING_Interpreter *is)
328{ 330{
329 struct ConnectPeersState *cps = cls; 331 struct ConnectPeersState *cps = cls;
@@ -341,11 +343,14 @@ connect_peers_run (void *cls,
341 struct GNUNET_TESTING_ADDRESS_PREFIX *pos_prefix; 343 struct GNUNET_TESTING_ADDRESS_PREFIX *pos_prefix;
342 unsigned int con_num = 0; 344 unsigned int con_num = 0;
343 345
344 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->start_peer_label); 346 cps->is = is;
347 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (is,
348 cps->start_peer_label);
345 GNUNET_TRANSPORT_get_trait_application_handle_v2 (peer1_cmd, 349 GNUNET_TRANSPORT_get_trait_application_handle_v2 (peer1_cmd,
346 &ah); 350 &ah);
347 351
348 system_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->create_label); 352 system_cmd = GNUNET_TESTING_interpreter_lookup_command (is,
353 cps->create_label);
349 GNUNET_TESTING_get_trait_test_system (system_cmd, 354 GNUNET_TESTING_get_trait_test_system (system_cmd,
350 &tl_system); 355 &tl_system);
351 356
@@ -410,7 +415,8 @@ connect_peers_finish (void *cls,
410 struct GNUNET_TESTING_NodeConnection *pos_connection; 415 struct GNUNET_TESTING_NodeConnection *pos_connection;
411 unsigned int num; 416 unsigned int num;
412 417
413 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->start_peer_label); 418 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->is,
419 cps->start_peer_label);
414 GNUNET_TRANSPORT_get_trait_connected_peers_map_v2 (peer1_cmd, 420 GNUNET_TRANSPORT_get_trait_connected_peers_map_v2 (peer1_cmd,
415 &connected_peers_map); 421 &connected_peers_map);
416 422
@@ -430,7 +436,6 @@ connect_peers_finish (void *cls,
430 } 436 }
431 437
432 438
433
434 if (cps->con_num == con_num) 439 if (cps->con_num == con_num)
435 { 440 {
436 cont (cont_cls); 441 cont (cont_cls);
@@ -461,8 +466,7 @@ connect_peers_traits (void *cls,
461 * 466 *
462 */ 467 */
463static void 468static void
464connect_peers_cleanup (void *cls, 469connect_peers_cleanup (void *cls)
465 const struct GNUNET_TESTING_Command *cmd)
466{ 470{
467 struct ConnectPeersState *cps = cls; 471 struct ConnectPeersState *cps = cls;
468 472