diff options
Diffstat (limited to 'src/testbed/gnunet-cmds-helper.c')
-rw-r--r-- | src/testbed/gnunet-cmds-helper.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/testbed/gnunet-cmds-helper.c b/src/testbed/gnunet-cmds-helper.c index 693892a9c..6498d1279 100644 --- a/src/testbed/gnunet-cmds-helper.c +++ b/src/testbed/gnunet-cmds-helper.c | |||
@@ -383,7 +383,7 @@ write_message (struct GNUNET_MessageHeader *message, size_t msg_length) | |||
383 | * @param cls plugin to use. | 383 | * @param cls plugin to use. |
384 | * | 384 | * |
385 | */ | 385 | */ |
386 | static void | 386 | /*static void |
387 | run_plugin (void *cls) | 387 | run_plugin (void *cls) |
388 | { | 388 | { |
389 | struct Plugin *plugin = cls; | 389 | struct Plugin *plugin = cls; |
@@ -400,7 +400,7 @@ run_plugin (void *cls) | |||
400 | 400 | ||
401 | plugin->api->start_testcase (&write_message, router_ip, node_ip); | 401 | plugin->api->start_testcase (&write_message, router_ip, node_ip); |
402 | 402 | ||
403 | } | 403 | }*/ |
404 | 404 | ||
405 | 405 | ||
406 | /** | 406 | /** |
@@ -433,12 +433,7 @@ tokenizer_cb (void *cls, const struct GNUNET_MessageHeader *message) | |||
433 | "tokenizer \n"); | 433 | "tokenizer \n"); |
434 | 434 | ||
435 | msize = ntohs (message->size); | 435 | msize = ntohs (message->size); |
436 | if (GNUNET_MESSAGE_TYPE_CMDS_HELPER_ALL_PEERS_STARTED == ntohs ( | 436 | if (GNUNET_MESSAGE_TYPE_CMDS_HELPER_INIT == ntohs (message->type)) |
437 | message->type)) | ||
438 | { | ||
439 | plugin->api->all_peers_started (); | ||
440 | } | ||
441 | else if (GNUNET_MESSAGE_TYPE_CMDS_HELPER_INIT == ntohs (message->type)) | ||
442 | { | 437 | { |
443 | msg = (const struct GNUNET_CMDS_HelperInit *) message; | 438 | msg = (const struct GNUNET_CMDS_HelperInit *) message; |
444 | plugin_name_size = ntohs (msg->plugin_name_size); | 439 | plugin_name_size = ntohs (msg->plugin_name_size); |
@@ -519,7 +514,7 @@ tokenizer_cb (void *cls, const struct GNUNET_MessageHeader *message) | |||
519 | 514 | ||
520 | GNUNET_free (binary); | 515 | GNUNET_free (binary); |
521 | 516 | ||
522 | done_reading = GNUNET_YES; | 517 | // done_reading = GNUNET_YES; |
523 | 518 | ||
524 | msg_length = sizeof(struct GNUNET_CMDS_HelperReply); | 519 | msg_length = sizeof(struct GNUNET_CMDS_HelperReply); |
525 | reply = GNUNET_new (struct GNUNET_CMDS_HelperReply); | 520 | reply = GNUNET_new (struct GNUNET_CMDS_HelperReply); |
@@ -541,6 +536,14 @@ tokenizer_cb (void *cls, const struct GNUNET_MessageHeader *message) | |||
541 | NULL);*/ | 536 | NULL);*/ |
542 | return GNUNET_OK; | 537 | return GNUNET_OK; |
543 | } | 538 | } |
539 | else if (GNUNET_MESSAGE_TYPE_CMDS_HELPER_ALL_PEERS_STARTED == ntohs ( | ||
540 | message->type)) | ||
541 | { | ||
542 | LOG (GNUNET_ERROR_TYPE_ERROR, | ||
543 | "We got here 8!\n"); | ||
544 | plugin->api->all_peers_started (); | ||
545 | return GNUNET_OK; | ||
546 | } | ||
544 | else | 547 | else |
545 | { | 548 | { |
546 | LOG (GNUNET_ERROR_TYPE_WARNING, "Received unexpected message -- exiting\n"); | 549 | LOG (GNUNET_ERROR_TYPE_WARNING, "Received unexpected message -- exiting\n"); |
@@ -588,6 +591,8 @@ read_task (void *cls) | |||
588 | return; | 591 | return; |
589 | } | 592 | } |
590 | LOG_DEBUG ("Read %u bytes\n", (unsigned int) sread); | 593 | LOG_DEBUG ("Read %u bytes\n", (unsigned int) sread); |
594 | LOG (GNUNET_ERROR_TYPE_ERROR, | ||
595 | "Read %u bytes\n", (unsigned int) sread); | ||
591 | /* FIXME: could introduce a GNUNET_MST_read2 to read | 596 | /* FIXME: could introduce a GNUNET_MST_read2 to read |
592 | directly from 'stdin_fd' and save a memcpy() here */ | 597 | directly from 'stdin_fd' and save a memcpy() here */ |
593 | if (GNUNET_OK != | 598 | if (GNUNET_OK != |