diff options
Diffstat (limited to 'src/transport/plugin_cmd_simple_send.c')
-rw-r--r-- | src/transport/plugin_cmd_simple_send.c | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/src/transport/plugin_cmd_simple_send.c b/src/transport/plugin_cmd_simple_send.c index ed3481c00..1fa2f1f03 100644 --- a/src/transport/plugin_cmd_simple_send.c +++ b/src/transport/plugin_cmd_simple_send.c | |||
@@ -26,8 +26,9 @@ | |||
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet_testing_ng_lib.h" | 27 | #include "gnunet_testing_ng_lib.h" |
28 | #include "gnunet_util_lib.h" | 28 | #include "gnunet_util_lib.h" |
29 | #include "gnunet_transport_application_service.h" | ||
30 | #include "gnunet_transport_service.h" | ||
29 | #include "gnunet_testbed_ng_service.h" | 31 | #include "gnunet_testbed_ng_service.h" |
30 | |||
31 | /** | 32 | /** |
32 | * Generic logging shortcut | 33 | * Generic logging shortcut |
33 | */ | 34 | */ |
@@ -35,6 +36,20 @@ | |||
35 | 36 | ||
36 | #define BASE_DIR "testdir" | 37 | #define BASE_DIR "testdir" |
37 | 38 | ||
39 | struct GNUNET_MQ_MessageHandler *handlers; | ||
40 | |||
41 | const char *cfgname; | ||
42 | |||
43 | unsigned int are_all_peers_started; | ||
44 | |||
45 | static void | ||
46 | all_peers_started () | ||
47 | { | ||
48 | are_all_peers_started = GNUNET_YES; | ||
49 | LOG (GNUNET_ERROR_TYPE_ERROR, | ||
50 | "setting are_all_peers_started: %d\n", | ||
51 | are_all_peers_started); | ||
52 | } | ||
38 | 53 | ||
39 | static void | 54 | static void |
40 | start_testcase (TESTBED_CMD_HELPER_write_cb write_message, char *router_ip, | 55 | start_testcase (TESTBED_CMD_HELPER_write_cb write_message, char *router_ip, |
@@ -42,10 +57,9 @@ start_testcase (TESTBED_CMD_HELPER_write_cb write_message, char *router_ip, | |||
42 | char *m, | 57 | char *m, |
43 | char *n) | 58 | char *n) |
44 | { | 59 | { |
45 | struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get (); | ||
46 | char *testdir; | 60 | char *testdir; |
47 | 61 | ||
48 | testdir = GNUNET_malloc (strlen (basedir) + strlen (m) + strlen (n) | 62 | testdir = GNUNET_malloc (strlen (BASE_DIR) + strlen (m) + strlen (n) |
49 | + 1); | 63 | + 1); |
50 | 64 | ||
51 | strcpy (testdir, BASE_DIR); | 65 | strcpy (testdir, BASE_DIR); |
@@ -55,19 +69,19 @@ start_testcase (TESTBED_CMD_HELPER_write_cb write_message, char *router_ip, | |||
55 | struct GNUNET_TESTING_Command commands[] = { | 69 | struct GNUNET_TESTING_Command commands[] = { |
56 | GNUNET_TESTING_cmd_system_create ("system-create-1", | 70 | GNUNET_TESTING_cmd_system_create ("system-create-1", |
57 | testdir), | 71 | testdir), |
58 | GNUNET_TESTING_cmd_start_peer ("start-peer-1", | 72 | /*GNUNET_TRANSPORT_cmd_start_peer ("start-peer-1", |
59 | "system-create-1", | 73 | "system-create-1", |
60 | m, | 74 | m, |
61 | n, | 75 | n, |
62 | struct GNUNET_MQ_MessageHandler *handlers, | 76 | handlers, |
63 | const char *cfgname), | 77 | cfgname),*/ |
64 | GNUNET_TESTING_cmd_send_peer_ready ("send-peer-ready-1", | 78 | GNUNET_TESTING_cmd_send_peer_ready ("send-peer-ready-1", |
65 | write_message), | 79 | write_message), |
66 | GNUNET_TESTING_cmd_block_until_all_peers_started ("block-1", | 80 | GNUNET_TESTING_cmd_block_until_all_peers_started ("block-1", |
67 | &are_all_peers_started), | 81 | &are_all_peers_started), |
68 | GNUNET_TESTING_cmd_connect_peers ("connect-peers-1", | 82 | /*GNUNET_TRANSPORT_cmd_connect_peers ("connect-peers-1", |
69 | "start-peer-1", | 83 | "start-peer-1", |
70 | "this is useless"), | 84 | "this is useless"),*/ |
71 | /*GNUNET_TESTING_cmd_send_simple ("send-simple-1", | 85 | /*GNUNET_TESTING_cmd_send_simple ("send-simple-1", |
72 | char *m, | 86 | char *m, |
73 | char *n, | 87 | char *n, |