aboutsummaryrefslogtreecommitdiff
path: root/src/transport/transport_api_cmd_send_simple.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/transport_api_cmd_send_simple.c')
-rw-r--r--src/transport/transport_api_cmd_send_simple.c48
1 files changed, 16 insertions, 32 deletions
diff --git a/src/transport/transport_api_cmd_send_simple.c b/src/transport/transport_api_cmd_send_simple.c
index f9e515c0f..0631f7051 100644
--- a/src/transport/transport_api_cmd_send_simple.c
+++ b/src/transport/transport_api_cmd_send_simple.c
@@ -36,18 +36,6 @@
36struct SendSimpleState 36struct SendSimpleState
37{ 37{
38 /** 38 /**
39 * The number of the local node of the actual network namespace.
40 *
41 */
42 char *m;
43
44 /**
45 * The number of the actual namespace.
46 *
47 */
48 char *n;
49
50 /**
51 * Number globally identifying the node. 39 * Number globally identifying the node.
52 * 40 *
53 */ 41 */
@@ -80,8 +68,7 @@ send_simple_traits (void *cls,
80 * 68 *
81 */ 69 */
82static void 70static void
83send_simple_cleanup (void *cls, 71send_simple_cleanup (void *cls)
84 const struct GNUNET_TESTING_Command *cmd)
85{ 72{
86 struct SendSimpleState *sss = cls; 73 struct SendSimpleState *sss = cls;
87 74
@@ -95,7 +82,6 @@ send_simple_cleanup (void *cls,
95 */ 82 */
96static void 83static void
97send_simple_run (void *cls, 84send_simple_run (void *cls,
98 const struct GNUNET_TESTING_Command *cmd,
99 struct GNUNET_TESTING_Interpreter *is) 85 struct GNUNET_TESTING_Interpreter *is)
100{ 86{
101 struct SendSimpleState *sss = cls; 87 struct SendSimpleState *sss = cls;
@@ -108,7 +94,8 @@ send_simple_run (void *cls,
108 struct GNUNET_HashCode hc; 94 struct GNUNET_HashCode hc;
109 int node_number; 95 int node_number;
110 96
111 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (sss->start_peer_label); 97 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (is,
98 sss->start_peer_label);
112 GNUNET_TRANSPORT_get_trait_connected_peers_map (peer1_cmd, 99 GNUNET_TRANSPORT_get_trait_connected_peers_map (peer1_cmd,
113 &connected_peers_map); 100 &connected_peers_map);
114 101
@@ -147,26 +134,23 @@ send_simple_run (void *cls,
147 */ 134 */
148struct GNUNET_TESTING_Command 135struct GNUNET_TESTING_Command
149GNUNET_TRANSPORT_cmd_send_simple (const char *label, 136GNUNET_TRANSPORT_cmd_send_simple (const char *label,
150 char *m, 137 const char *start_peer_label,
151 char *n, 138 uint32_t num)
152 uint32_t num,
153 const char *start_peer_label)
154{ 139{
155 struct SendSimpleState *sss; 140 struct SendSimpleState *sss;
156 141
157 sss = GNUNET_new (struct SendSimpleState); 142 sss = GNUNET_new (struct SendSimpleState);
158 sss->m = m;
159 sss->n = n;
160 sss->num = num; 143 sss->num = num;
161 sss->start_peer_label = start_peer_label; 144 sss->start_peer_label = start_peer_label;
162 145 {
163 struct GNUNET_TESTING_Command cmd = { 146 struct GNUNET_TESTING_Command cmd = {
164 .cls = sss, 147 .cls = sss,
165 .label = label, 148 .label = label,
166 .run = &send_simple_run, 149 .run = &send_simple_run,
167 .cleanup = &send_simple_cleanup, 150 .cleanup = &send_simple_cleanup,
168 .traits = &send_simple_traits 151 .traits = &send_simple_traits
169 }; 152 };
170 153
171 return cmd; 154 return cmd;
155 }
172} 156}