aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/testbed_api_cmd_block_until_all_peers_started.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testbed/testbed_api_cmd_block_until_all_peers_started.c')
-rw-r--r--src/testbed/testbed_api_cmd_block_until_all_peers_started.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/testbed/testbed_api_cmd_block_until_all_peers_started.c b/src/testbed/testbed_api_cmd_block_until_all_peers_started.c
index fc872311d..8659fbb46 100644
--- a/src/testbed/testbed_api_cmd_block_until_all_peers_started.c
+++ b/src/testbed/testbed_api_cmd_block_until_all_peers_started.c
@@ -27,6 +27,11 @@
27#include "gnunet_util_lib.h" 27#include "gnunet_util_lib.h"
28#include "gnunet_testing_ng_lib.h" 28#include "gnunet_testing_ng_lib.h"
29 29
30/**
31 * Generic logging shortcut
32 */
33#define LOG(kind, ...) GNUNET_log (kind, __VA_ARGS__)
34
30struct BlockState 35struct BlockState
31{ 36{
32 unsigned int *all_peers_started; 37 unsigned int *all_peers_started;
@@ -58,6 +63,8 @@ block_until_all_peers_started_run (void *cls,
58 const struct GNUNET_TESTING_Command *cmd, 63 const struct GNUNET_TESTING_Command *cmd,
59 struct GNUNET_TESTING_Interpreter *is) 64 struct GNUNET_TESTING_Interpreter *is)
60{ 65{
66 LOG (GNUNET_ERROR_TYPE_ERROR,
67 "block_until_all_peers_started_run!\n");
61} 68}
62 69
63 70
@@ -69,6 +76,21 @@ block_until_all_peers_started_finish (void *cls,
69 struct BlockState *bs = cls; 76 struct BlockState *bs = cls;
70 unsigned int *ret = bs->all_peers_started; 77 unsigned int *ret = bs->all_peers_started;
71 78
79 LOG (GNUNET_ERROR_TYPE_ERROR,
80 "We got here 10\n");
81
82 if (GNUNET_YES == *ret)
83 {
84 LOG (GNUNET_ERROR_TYPE_ERROR,
85 "We do not need to block anymore!\n");
86 cont (cont_cls);
87 }
88 else
89 {
90 LOG (GNUNET_ERROR_TYPE_ERROR,
91 "You shall not pass!\n");
92 }
93
72 return *ret; 94 return *ret;
73} 95}
74 96
@@ -86,6 +108,10 @@ GNUNET_TESTING_cmd_block_until_all_peers_started (const char *label,
86{ 108{
87 struct BlockState *bs; 109 struct BlockState *bs;
88 110
111 LOG (GNUNET_ERROR_TYPE_ERROR,
112 "we have all_peers_started: %u\n",
113 *all_peers_started);
114
89 bs = GNUNET_new (struct BlockState); 115 bs = GNUNET_new (struct BlockState);
90 bs->all_peers_started = all_peers_started; 116 bs->all_peers_started = all_peers_started;
91 117