aboutsummaryrefslogtreecommitdiff
path: root/src/testing/gnunet-cmds-helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/gnunet-cmds-helper.c')
-rw-r--r--src/testing/gnunet-cmds-helper.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/testing/gnunet-cmds-helper.c b/src/testing/gnunet-cmds-helper.c
index 21ea33888..8f9e77709 100644
--- a/src/testing/gnunet-cmds-helper.c
+++ b/src/testing/gnunet-cmds-helper.c
@@ -163,14 +163,17 @@ struct WriteContext
163 size_t pos; 163 size_t pos;
164}; 164};
165 165
166struct Plugin *plugin;
167
168/** 166/**
169 * The process handle to the testbed service 167 * The process handle to the testbed service
170 168
171static struct GNUNET_OS_Process *cmd_binary_process;*/ 169static struct GNUNET_OS_Process *cmd_binary_process;*/
172 170
173/** 171/**
172 * Plugin to dynamically load a test case.
173 */
174struct Plugin *plugin;
175
176/**
174 * Handle to the testing system 177 * Handle to the testing system
175 */ 178 */
176static struct GNUNET_TESTING_System *test_system; 179static struct GNUNET_TESTING_System *test_system;
@@ -329,6 +332,7 @@ write_message (struct GNUNET_MessageHeader *message, size_t msg_length)
329static int 332static int
330tokenizer_cb (void *cls, const struct GNUNET_MessageHeader *message) 333tokenizer_cb (void *cls, const struct GNUNET_MessageHeader *message)
331{ 334{
335
332 struct NodeIdentifier *ni = cls; 336 struct NodeIdentifier *ni = cls;
333 const struct GNUNET_CMDS_HelperInit *msg; 337 const struct GNUNET_CMDS_HelperInit *msg;
334 struct GNUNET_CMDS_HelperReply *reply; 338 struct GNUNET_CMDS_HelperReply *reply;
@@ -369,14 +373,14 @@ tokenizer_cb (void *cls, const struct GNUNET_MessageHeader *message)
369 plugin->n = ni->n; 373 plugin->n = ni->n;
370 plugin->m = ni->m; 374 plugin->m = ni->m;
371 375
372 router_ip = GNUNET_malloc (strlen (ROUTER_BASE_IP) + strlen (plugin->m) 376 router_ip = GNUNET_malloc (strlen (ROUTER_BASE_IP) + strlen (plugin->n)
373 + 1); 377 + 1);
374 strcpy (router_ip, ROUTER_BASE_IP); 378 strcpy (router_ip, ROUTER_BASE_IP);
375 strcat (router_ip, plugin->m); 379 strcat (router_ip, plugin->n);
376 380
377 node_ip = GNUNET_malloc (strlen (NODE_BASE_IP) + strlen (plugin->n) + 1); 381 node_ip = GNUNET_malloc (strlen (NODE_BASE_IP) + strlen (plugin->m) + 1);
378 strcat (node_ip, NODE_BASE_IP); 382 strcat (node_ip, NODE_BASE_IP);
379 strcat (node_ip, plugin->n); 383 strcat (node_ip, plugin->m);
380 384
381 plugin->api->start_testcase (&write_message, router_ip, node_ip, plugin->m, 385 plugin->api->start_testcase (&write_message, router_ip, node_ip, plugin->m,
382 plugin->n, plugin->local_m); 386 plugin->n, plugin->local_m);
@@ -533,8 +537,8 @@ main (int argc, char **argv)
533 ni = GNUNET_new (struct NodeIdentifier); 537 ni = GNUNET_new (struct NodeIdentifier);
534 ni->global_n = argv[1]; 538 ni->global_n = argv[1];
535 ni->local_m = argv[2]; 539 ni->local_m = argv[2];
536 ni->n = argv[3]; 540 ni->m = argv[3];
537 ni->m = argv[4]; 541 ni->n = argv[4];
538 542
539 status = GNUNET_OK; 543 status = GNUNET_OK;
540 if (NULL == 544 if (NULL ==