aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing.c')
-rw-r--r--src/testing/testing.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/testing/testing.c b/src/testing/testing.c
index 20cf17895..56dc4e92d 100644
--- a/src/testing/testing.c
+++ b/src/testing/testing.c
@@ -2156,6 +2156,27 @@ get_node_info (unsigned int num,
2156 } 2156 }
2157} 2157}
2158 2158
2159/**
2160 * Get a node from the topology.
2161 *
2162 * @param num The specific node we want the connections for.
2163 * @param topology The topology we get the connections from.
2164 * @return The connections of the node.
2165 */
2166struct GNUNET_TESTING_NetjailNode *
2167GNUNET_TESTING_get_node (unsigned int num,
2168 struct GNUNET_TESTING_NetjailTopology *topology)
2169{
2170 struct GNUNET_TESTING_NetjailNode *node;
2171 struct GNUNET_TESTING_NetjailNamespace *namespace;
2172 struct GNUNET_TESTING_NodeConnection *node_connections;
2173
2174 get_node_info (num, topology, &node, &namespace, &node_connections);
2175
2176 return node;
2177
2178}
2179
2159 2180
2160/** 2181/**
2161 * Get the connections to other nodes for a specific node. 2182 * Get the connections to other nodes for a specific node.
@@ -2227,7 +2248,7 @@ free_nodes_cb (void *cls,
2227 pos_connection); 2248 pos_connection);
2228 GNUNET_free (pos_connection); 2249 GNUNET_free (pos_connection);
2229 } 2250 }
2230 2251
2231 GNUNET_free (node->plugin); 2252 GNUNET_free (node->plugin);
2232 GNUNET_free (node); 2253 GNUNET_free (node);
2233 return GNUNET_OK; 2254 return GNUNET_OK;
@@ -2244,7 +2265,7 @@ free_namespaces_cb (void *cls,
2244 2265
2245 GNUNET_free (namespace->router); 2266 GNUNET_free (namespace->router);
2246 GNUNET_CONTAINER_multishortmap_iterate (namespace->nodes, free_nodes_cb, 2267 GNUNET_CONTAINER_multishortmap_iterate (namespace->nodes, free_nodes_cb,
2247 NULL); 2268 namespace->nodes);
2248 return GNUNET_OK; 2269 return GNUNET_OK;
2249 2270
2250} 2271}