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 d18197860..de6bc45f5 100644
--- a/src/testing/testing.c
+++ b/src/testing/testing.c
@@ -2136,6 +2136,27 @@ get_node_info (unsigned int num,
2136 GNUNET_free (hkey); 2136 GNUNET_free (hkey);
2137} 2137}
2138 2138
2139/**
2140 * Get a node from the topology.
2141 *
2142 * @param num The specific node we want the connections for.
2143 * @param topology The topology we get the connections from.
2144 * @return The connections of the node.
2145 */
2146struct GNUNET_TESTING_NetjailNode *
2147GNUNET_TESTING_get_node (unsigned int num,
2148 struct GNUNET_TESTING_NetjailTopology *topology)
2149{
2150 struct GNUNET_TESTING_NetjailNode *node;
2151 struct GNUNET_TESTING_NetjailNamespace *namespace;
2152 struct GNUNET_TESTING_NodeConnection *node_connections;
2153
2154 get_node_info (num, topology, &node, &namespace, &node_connections);
2155
2156 return node;
2157
2158}
2159
2139 2160
2140/** 2161/**
2141 * Get the connections to other nodes for a specific node. 2162 * Get the connections to other nodes for a specific node.
@@ -2208,7 +2229,7 @@ free_nodes_cb (void *cls,
2208 pos_connection); 2229 pos_connection);
2209 GNUNET_free (pos_connection); 2230 GNUNET_free (pos_connection);
2210 } 2231 }
2211 2232
2212 GNUNET_free (node->plugin); 2233 GNUNET_free (node->plugin);
2213 GNUNET_free (node); 2234 GNUNET_free (node);
2214 return GNUNET_OK; 2235 return GNUNET_OK;
@@ -2225,7 +2246,7 @@ free_namespaces_cb (void *cls,
2225 2246
2226 GNUNET_free (namespace->router); 2247 GNUNET_free (namespace->router);
2227 GNUNET_CONTAINER_multishortmap_iterate (namespace->nodes, free_nodes_cb, 2248 GNUNET_CONTAINER_multishortmap_iterate (namespace->nodes, free_nodes_cb,
2228 NULL); 2249 namespace->nodes);
2229 return GNUNET_OK; 2250 return GNUNET_OK;
2230 2251
2231} 2252}