aboutsummaryrefslogtreecommitdiff
path: root/src/transport/transport_api_cmd_connecting_peers.c
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2021-11-19 15:18:24 +0100
committert3sserakt <t3ss@posteo.de>2021-11-19 15:18:24 +0100
commit6a043a9228022fcce97fd50739db74abdabde055 (patch)
tree8cba6d9a87731cce5d20a3f8f2cf0cb2cb8ef37d /src/transport/transport_api_cmd_connecting_peers.c
parent154d13fcb10205edf5fb56c12ac47e65abfec5a6 (diff)
downloadgnunet-6a043a9228022fcce97fd50739db74abdabde055.tar.gz
gnunet-6a043a9228022fcce97fd50739db74abdabde055.zip
- Fixed header, fixed log level, changed block until connect logic, fixed memory issues.
Diffstat (limited to 'src/transport/transport_api_cmd_connecting_peers.c')
-rw-r--r--src/transport/transport_api_cmd_connecting_peers.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/transport/transport_api_cmd_connecting_peers.c b/src/transport/transport_api_cmd_connecting_peers.c
index b50b63c62..3fef7d687 100644
--- a/src/transport/transport_api_cmd_connecting_peers.c
+++ b/src/transport/transport_api_cmd_connecting_peers.c
@@ -113,17 +113,20 @@ connect_peers_run (void *cls,
113 * 113 *
114 */ 114 */
115static void * 115static void *
116notify_connect (void *cls, 116notify_connect (struct GNUNET_TESTING_Interpreter *is,
117 const struct GNUNET_PeerIdentity *peer, 117 const struct GNUNET_PeerIdentity *peer)
118 struct GNUNET_MQ_Handle *mq)
119{ 118{
120 struct ConnectPeersState *cps = cls; 119 const struct GNUNET_TESTING_Command *cmd;
120 struct ConnectPeersState *cps;
121 struct GNUNET_PeerIdentity *peer_connection; 121 struct GNUNET_PeerIdentity *peer_connection;
122 unsigned int con_num = 0; 122 unsigned int con_num = 0;
123 struct GNUNET_TESTING_NodeConnection *pos_connection; 123 struct GNUNET_TESTING_NodeConnection *pos_connection;
124 unsigned int num; 124 unsigned int num;
125 void *ret = NULL; 125 void *ret = NULL;
126 126
127 cmd = GNUNET_TESTING_interpreter_lookup_command (is,
128 "connect-peers");
129 cps = cmd->cls;
127 for (pos_connection = cps->node_connections_head; NULL != pos_connection; 130 for (pos_connection = cps->node_connections_head; NULL != pos_connection;
128 pos_connection = pos_connection->next) 131 pos_connection = pos_connection->next)
129 { 132 {
@@ -217,7 +220,7 @@ GNUNET_TRANSPORT_cmd_connect_peers (const char *label,
217 cps->num = num; 220 cps->num = num;
218 cps->create_label = create_label; 221 cps->create_label = create_label;
219 cps->topology = topology; 222 cps->topology = topology;
220 cps->notify_connect = &notify_connect; 223 cps->notify_connect = notify_connect;
221 224
222 { 225 {
223 struct GNUNET_TESTING_Command cmd = { 226 struct GNUNET_TESTING_Command cmd = {