aboutsummaryrefslogtreecommitdiff
path: root/src/transport/transport_api_cmd_connecting_peers_v2.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-10-06 09:34:19 +0200
committerChristian Grothoff <christian@grothoff.org>2021-10-06 09:34:19 +0200
commitffa7a0ab292b190ed10cd54645593fe31c5796bc (patch)
tree030328c2b46531e8b4bae878f173c96fb7dd3e80 /src/transport/transport_api_cmd_connecting_peers_v2.c
parent961685fab53555a7b62301982927432988b8fdc2 (diff)
downloadgnunet-ffa7a0ab292b190ed10cd54645593fe31c5796bc.tar.gz
gnunet-ffa7a0ab292b190ed10cd54645593fe31c5796bc.zip
-fix FTBFS
Diffstat (limited to 'src/transport/transport_api_cmd_connecting_peers_v2.c')
-rw-r--r--src/transport/transport_api_cmd_connecting_peers_v2.c39
1 files changed, 22 insertions, 17 deletions
diff --git a/src/transport/transport_api_cmd_connecting_peers_v2.c b/src/transport/transport_api_cmd_connecting_peers_v2.c
index 0d286b714..8ef556946 100644
--- a/src/transport/transport_api_cmd_connecting_peers_v2.c
+++ b/src/transport/transport_api_cmd_connecting_peers_v2.c
@@ -64,6 +64,8 @@ struct ConnectPeersState
64 * 64 *
65 */ 65 */
66 struct GNUNET_PeerIdentity *id; 66 struct GNUNET_PeerIdentity *id;
67
68 struct GNUNET_TESTING_Interpreter *is;
67}; 69};
68 70
69 71
@@ -73,7 +75,6 @@ struct ConnectPeersState
73 */ 75 */
74static void 76static void
75connect_peers_run (void *cls, 77connect_peers_run (void *cls,
76 const struct GNUNET_TESTING_Command *cmd,
77 struct GNUNET_TESTING_Interpreter *is) 78 struct GNUNET_TESTING_Interpreter *is)
78{ 79{
79 struct ConnectPeersState *cps = cls; 80 struct ConnectPeersState *cps = cls;
@@ -91,11 +92,14 @@ connect_peers_run (void *cls,
91 struct GNUNET_PeerIdentity *other = GNUNET_new (struct GNUNET_PeerIdentity); 92 struct GNUNET_PeerIdentity *other = GNUNET_new (struct GNUNET_PeerIdentity);
92 uint32_t num; 93 uint32_t num;
93 94
94 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->start_peer_label); 95 cps->is = is;
96 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (is,
97 cps->start_peer_label);
95 GNUNET_TRANSPORT_get_trait_application_handle_v2 (peer1_cmd, 98 GNUNET_TRANSPORT_get_trait_application_handle_v2 (peer1_cmd,
96 &ah); 99 &ah);
97 100
98 system_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->create_label); 101 system_cmd = GNUNET_TESTING_interpreter_lookup_command (is,
102 cps->create_label);
99 GNUNET_TESTING_get_trait_test_system (system_cmd, 103 GNUNET_TESTING_get_trait_test_system (system_cmd,
100 &tl_system); 104 &tl_system);
101 105
@@ -155,7 +159,8 @@ connect_peers_finish (void *cls,
155 struct GNUNET_HashCode hc; 159 struct GNUNET_HashCode hc;
156 int node_number; 160 int node_number;
157 161
158 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->start_peer_label); 162 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->is,
163 cps->start_peer_label);
159 GNUNET_TRANSPORT_get_trait_connected_peers_map_v2 (peer1_cmd, 164 GNUNET_TRANSPORT_get_trait_connected_peers_map_v2 (peer1_cmd,
160 &connected_peers_map); 165 &connected_peers_map);
161 166
@@ -198,8 +203,7 @@ connect_peers_traits (void *cls,
198 * 203 *
199 */ 204 */
200static void 205static void
201connect_peers_cleanup (void *cls, 206connect_peers_cleanup (void *cls)
202 const struct GNUNET_TESTING_Command *cmd)
203{ 207{
204 struct ConnectPeersState *cps = cls; 208 struct ConnectPeersState *cps = cls;
205 209
@@ -228,15 +232,16 @@ GNUNET_TRANSPORT_cmd_connect_peers_v2 (const char *label,
228 cps->num = num; 232 cps->num = num;
229 cps->create_label = create_label; 233 cps->create_label = create_label;
230 234
231 235 {
232 struct GNUNET_TESTING_Command cmd = { 236 struct GNUNET_TESTING_Command cmd = {
233 .cls = cps, 237 .cls = cps,
234 .label = label, 238 .label = label,
235 .run = &connect_peers_run, 239 .run = &connect_peers_run,
236 .finish = &connect_peers_finish, 240 .finish = &connect_peers_finish,
237 .cleanup = &connect_peers_cleanup, 241 .cleanup = &connect_peers_cleanup,
238 .traits = &connect_peers_traits 242 .traits = &connect_peers_traits
239 }; 243 };
240 244
241 return cmd; 245 return cmd;
246 }
242} 247}