diff options
-rw-r--r-- | src/include/gnunet_testbed_ng_service.h | 4 | ||||
-rw-r--r-- | src/testbed/Makefile.am | 2 | ||||
-rw-r--r-- | src/testbed/testbed_api_cmd_peer.c | 17 |
3 files changed, 12 insertions, 11 deletions
diff --git a/src/include/gnunet_testbed_ng_service.h b/src/include/gnunet_testbed_ng_service.h index ec14d0539..a6f30889f 100644 --- a/src/include/gnunet_testbed_ng_service.h +++ b/src/include/gnunet_testbed_ng_service.h | |||
@@ -66,7 +66,7 @@ struct ServiceState | |||
66 | const char *servicename; | 66 | const char *servicename; |
67 | }; | 67 | }; |
68 | 68 | ||
69 | struct PeerState | 69 | struct PeerCmdState |
70 | { | 70 | { |
71 | /** | 71 | /** |
72 | * The label of a controller command. | 72 | * The label of a controller command. |
@@ -239,7 +239,7 @@ void | |||
239 | GNUNET_TESTBED_shutdown_controller (struct ControllerState *cs); | 239 | GNUNET_TESTBED_shutdown_controller (struct ControllerState *cs); |
240 | 240 | ||
241 | void | 241 | void |
242 | GNUNET_TESTBED_shutdown_peer (struct PeerState *ps); | 242 | GNUNET_TESTBED_shutdown_peer (struct PeerCmdState *ps); |
243 | 243 | ||
244 | void | 244 | void |
245 | GNUNET_TESTBED_shutdown_service (struct ServiceState *ss); | 245 | GNUNET_TESTBED_shutdown_service (struct ServiceState *ss); |
diff --git a/src/testbed/Makefile.am b/src/testbed/Makefile.am index 26013ea1c..7a59670cb 100644 --- a/src/testbed/Makefile.am +++ b/src/testbed/Makefile.am | |||
@@ -96,7 +96,7 @@ libgnunettestbed_la_SOURCES = \ | |||
96 | testbed_api_hosts.c testbed_api_hosts.h testbed_helper.h \ | 96 | testbed_api_hosts.c testbed_api_hosts.h testbed_helper.h \ |
97 | testbed_api_cmd_controller.c \ | 97 | testbed_api_cmd_controller.c \ |
98 | testbed_api_cmd_peer.c \ | 98 | testbed_api_cmd_peer.c \ |
99 | #testbed_api_cmd_service.c \ | 99 | testbed_api_cmd_service.c \ |
100 | testbed_api_operations.c testbed_api_operations.h \ | 100 | testbed_api_operations.c testbed_api_operations.h \ |
101 | testbed_api_peers.c testbed_api_peers.h \ | 101 | testbed_api_peers.c testbed_api_peers.h \ |
102 | testbed_api_services.c \ | 102 | testbed_api_services.c \ |
diff --git a/src/testbed/testbed_api_cmd_peer.c b/src/testbed/testbed_api_cmd_peer.c index f229a1596..4a727bc94 100644 --- a/src/testbed/testbed_api_cmd_peer.c +++ b/src/testbed/testbed_api_cmd_peer.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include "gnunet_testing_ng_lib.h" | 29 | #include "gnunet_testing_ng_lib.h" |
30 | #include "gnunet_testbed_ng_service.h" | 30 | #include "gnunet_testbed_ng_service.h" |
31 | #include "gnunet-service-testbed.h" | 31 | #include "gnunet-service-testbed.h" |
32 | #include "testbed_api_peers.h" | ||
32 | 33 | ||
33 | 34 | ||
34 | /** | 35 | /** |
@@ -81,7 +82,7 @@ peer_cleanup (void *cls, | |||
81 | static void | 82 | static void |
82 | do_abort (void *cls) | 83 | do_abort (void *cls) |
83 | { | 84 | { |
84 | struct PeerState *ps = cls; | 85 | struct PeerCmdState *ps = cls; |
85 | 86 | ||
86 | if (GNUNET_NO == ps->peer_ready) | 87 | if (GNUNET_NO == ps->peer_ready) |
87 | { | 88 | { |
@@ -103,7 +104,7 @@ static void | |||
103 | peer_started_cb (void *cls, | 104 | peer_started_cb (void *cls, |
104 | const char *emsg) | 105 | const char *emsg) |
105 | { | 106 | { |
106 | struct PeerState *ps = cls; | 107 | struct PeerCmdState *ps = cls; |
107 | 108 | ||
108 | GNUNET_TESTBED_operation_done (ps->operation); | 109 | GNUNET_TESTBED_operation_done (ps->operation); |
109 | if (NULL == emsg) | 110 | if (NULL == emsg) |
@@ -134,7 +135,7 @@ peer_create_cb (void *cls, | |||
134 | struct GNUNET_TESTBED_Peer *peer, | 135 | struct GNUNET_TESTBED_Peer *peer, |
135 | const char *emsg) | 136 | const char *emsg) |
136 | { | 137 | { |
137 | struct PeerState *ps = cls; | 138 | struct PeerCmdState *ps = cls; |
138 | 139 | ||
139 | ps->peer = peer; | 140 | ps->peer = peer; |
140 | GNUNET_TESTBED_operation_done (ps->operation); | 141 | GNUNET_TESTBED_operation_done (ps->operation); |
@@ -150,7 +151,7 @@ peer_run (void *cls, | |||
150 | const struct GNUNET_TESTING_Command *cmd, | 151 | const struct GNUNET_TESTING_Command *cmd, |
151 | struct GNUNET_TESTING_Interpreter *is) | 152 | struct GNUNET_TESTING_Interpreter *is) |
152 | { | 153 | { |
153 | struct PeerState *ps = cls; | 154 | struct PeerCmdState *ps = cls; |
154 | const struct GNUNET_TESTING_Command *controller_cmd; | 155 | const struct GNUNET_TESTING_Command *controller_cmd; |
155 | struct GNUNET_TESTBED_Controller *controller; | 156 | struct GNUNET_TESTBED_Controller *controller; |
156 | 157 | ||
@@ -180,7 +181,7 @@ void | |||
180 | peer_stopped_cb (void *cls, | 181 | peer_stopped_cb (void *cls, |
181 | const char *emsg) | 182 | const char *emsg) |
182 | { | 183 | { |
183 | struct PeerState *ps = cls; | 184 | struct PeerCmdState *ps = cls; |
184 | 185 | ||
185 | if (NULL != emsg) | 186 | if (NULL != emsg) |
186 | { | 187 | { |
@@ -198,7 +199,7 @@ peer_stopped_cb (void *cls, | |||
198 | * @param cs controller state. | 199 | * @param cs controller state. |
199 | */ | 200 | */ |
200 | void | 201 | void |
201 | GNUNET_TESTBED_shutdown_peer (struct PeerState *ps) | 202 | GNUNET_TESTBED_shutdown_peer (struct PeerCmdState *ps) |
202 | { | 203 | { |
203 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 204 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
204 | "Shutting down...\n"); | 205 | "Shutting down...\n"); |
@@ -227,9 +228,9 @@ GNUNET_TESTBED_cmd_peer (const char *label, | |||
227 | uint16_t port, | 228 | uint16_t port, |
228 | struct GNUNET_CONFIGURATION_Handle *cfg) | 229 | struct GNUNET_CONFIGURATION_Handle *cfg) |
229 | { | 230 | { |
230 | struct PeerState *ps; | 231 | struct PeerCmdState *ps; |
231 | 232 | ||
232 | ps = GNUNET_new (struct PeerState); | 233 | ps = GNUNET_new (struct PeerCmdState); |
233 | ps->hostname = hostname; | 234 | ps->hostname = hostname; |
234 | ps->username = username; | 235 | ps->username = username; |
235 | ps->port = port; | 236 | ps->port = port; |