aboutsummaryrefslogtreecommitdiff
path: root/src/transport/transport_api_cmd_connecting_peers.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/transport_api_cmd_connecting_peers.c')
-rw-r--r--src/transport/transport_api_cmd_connecting_peers.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/transport/transport_api_cmd_connecting_peers.c b/src/transport/transport_api_cmd_connecting_peers.c
index 09ca9e54c..ddf1c3872 100644
--- a/src/transport/transport_api_cmd_connecting_peers.c
+++ b/src/transport/transport_api_cmd_connecting_peers.c
@@ -62,6 +62,8 @@ struct ConnectPeersState
62 * 62 *
63 */ 63 */
64 struct GNUNET_PeerIdentity *id; 64 struct GNUNET_PeerIdentity *id;
65
66 struct GNUNET_TESTING_Interpreter *is;
65}; 67};
66 68
67 69
@@ -71,7 +73,6 @@ struct ConnectPeersState
71 */ 73 */
72static void 74static void
73connect_peers_run (void *cls, 75connect_peers_run (void *cls,
74 const struct GNUNET_TESTING_Command *cmd,
75 struct GNUNET_TESTING_Interpreter *is) 76 struct GNUNET_TESTING_Interpreter *is)
76{ 77{
77 struct ConnectPeersState *cps = cls; 78 struct ConnectPeersState *cps = cls;
@@ -96,7 +97,9 @@ connect_peers_run (void *cls,
96 struct GNUNET_PeerIdentity *other = GNUNET_new (struct GNUNET_PeerIdentity); 97 struct GNUNET_PeerIdentity *other = GNUNET_new (struct GNUNET_PeerIdentity);
97 uint32_t num; 98 uint32_t num;
98 99
99 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->start_peer_label); 100 cps->is = is;
101 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (is,
102 cps->start_peer_label);
100 GNUNET_TRANSPORT_get_trait_application_handle (peer1_cmd, 103 GNUNET_TRANSPORT_get_trait_application_handle (peer1_cmd,
101 &ah); 104 &ah);
102 105
@@ -106,7 +109,8 @@ connect_peers_run (void *cls,
106 GNUNET_TRANSPORT_get_trait_peer_id (peer1_cmd, 109 GNUNET_TRANSPORT_get_trait_peer_id (peer1_cmd,
107 &id); 110 &id);
108 111
109 system_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->create_label); 112 system_cmd = GNUNET_TESTING_interpreter_lookup_command (is,
113 cps->create_label);
110 GNUNET_TESTING_get_trait_test_system (system_cmd, 114 GNUNET_TESTING_get_trait_test_system (system_cmd,
111 &tl_system); 115 &tl_system);
112 116
@@ -116,8 +120,6 @@ connect_peers_run (void *cls,
116 num = 2; 120 num = 2;
117 121
118 122
119
120
121 // if (strstr (hello, "60002") != NULL) 123 // if (strstr (hello, "60002") != NULL)
122 if (2 == num) 124 if (2 == num)
123 { 125 {
@@ -194,7 +196,8 @@ connect_peers_finish (void *cls,
194 struct GNUNET_HashCode hc; 196 struct GNUNET_HashCode hc;
195 int node_number; 197 int node_number;
196 198
197 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->start_peer_label); 199 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->is,
200 cps->start_peer_label);
198 GNUNET_TRANSPORT_get_trait_connected_peers_map (peer1_cmd, 201 GNUNET_TRANSPORT_get_trait_connected_peers_map (peer1_cmd,
199 &connected_peers_map); 202 &connected_peers_map);
200 203
@@ -237,8 +240,7 @@ connect_peers_traits (void *cls,
237 * 240 *
238 */ 241 */
239static void 242static void
240connect_peers_cleanup (void *cls, 243connect_peers_cleanup (void *cls)
241 const struct GNUNET_TESTING_Command *cmd)
242{ 244{
243 struct ConnectPeersState *cps = cls; 245 struct ConnectPeersState *cps = cls;
244 246