aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/test_testbed_api_2peers_1controller.c
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2013-01-25 15:28:08 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2013-01-25 15:28:08 +0000
commit30c5c323f28ade8a1e7c6c593778793e44accb3a (patch)
tree845955ec895d221338b44f0cadce7932932e78cc /src/testbed/test_testbed_api_2peers_1controller.c
parent43d558efd13a3245e65efd0acdc9c4ba59cd2bee (diff)
downloadgnunet-30c5c323f28ade8a1e7c6c593778793e44accb3a.tar.gz
gnunet-30c5c323f28ade8a1e7c6c593778793e44accb3a.zip
- indent
Diffstat (limited to 'src/testbed/test_testbed_api_2peers_1controller.c')
-rw-r--r--src/testbed/test_testbed_api_2peers_1controller.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/testbed/test_testbed_api_2peers_1controller.c b/src/testbed/test_testbed_api_2peers_1controller.c
index 084df1007..d5616c233 100644
--- a/src/testbed/test_testbed_api_2peers_1controller.c
+++ b/src/testbed/test_testbed_api_2peers_1controller.c
@@ -227,7 +227,7 @@ do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
227 * @param emsg error message in case the operation has failed; will be NULL if 227 * @param emsg error message in case the operation has failed; will be NULL if
228 * operation has executed successfully. 228 * operation has executed successfully.
229 */ 229 */
230static void 230static void
231op_comp_cb (void *cls, struct GNUNET_TESTBED_Operation *op, const char *emsg); 231op_comp_cb (void *cls, struct GNUNET_TESTBED_Operation *op, const char *emsg);
232 232
233 233
@@ -242,8 +242,9 @@ do_delayed_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
242{ 242{
243 delayed_connect_task = GNUNET_SCHEDULER_NO_TASK; 243 delayed_connect_task = GNUNET_SCHEDULER_NO_TASK;
244 FAIL_TEST (NULL == common_operation); 244 FAIL_TEST (NULL == common_operation);
245 common_operation = GNUNET_TESTBED_overlay_connect (NULL, &op_comp_cb, NULL, 245 common_operation =
246 peer1.peer, peer2.peer); 246 GNUNET_TESTBED_overlay_connect (NULL, &op_comp_cb, NULL, peer1.peer,
247 peer2.peer);
247} 248}
248 249
249 250
@@ -255,11 +256,11 @@ do_delayed_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
255 * @param emsg error message in case the operation has failed; will be NULL if 256 * @param emsg error message in case the operation has failed; will be NULL if
256 * operation has executed successfully. 257 * operation has executed successfully.
257 */ 258 */
258static void 259static void
259op_comp_cb (void *cls, struct GNUNET_TESTBED_Operation *op, const char *emsg) 260op_comp_cb (void *cls, struct GNUNET_TESTBED_Operation *op, const char *emsg)
260{ 261{
261 FAIL_TEST (common_operation == op); 262 FAIL_TEST (common_operation == op);
262 switch(result) 263 switch (result)
263 { 264 {
264 case PEERS_STARTED: 265 case PEERS_STARTED:
265 FAIL_TEST (NULL == peer1.operation); 266 FAIL_TEST (NULL == peer1.operation);
@@ -336,7 +337,7 @@ controller_cb (void *cls, const struct GNUNET_TESTBED_EventInformation *event)
336 result = PEERS_STARTED; 337 result = PEERS_STARTED;
337 common_operation = 338 common_operation =
338 GNUNET_TESTBED_overlay_connect (NULL, &op_comp_cb, NULL, peer1.peer, 339 GNUNET_TESTBED_overlay_connect (NULL, &op_comp_cb, NULL, peer1.peer,
339 peer2.peer); 340 peer2.peer);
340 } 341 }
341 break; 342 break;
342 case GNUNET_TESTBED_ET_PEER_STOP: 343 case GNUNET_TESTBED_ET_PEER_STOP:
@@ -366,14 +367,14 @@ controller_cb (void *cls, const struct GNUNET_TESTBED_EventInformation *event)
366 FAIL_TEST (NULL == peer2.operation); 367 FAIL_TEST (NULL == peer2.operation);
367 FAIL_TEST (NULL != common_operation); 368 FAIL_TEST (NULL != common_operation);
368 FAIL_TEST ((event->details.peer_connect.peer1 == peer1.peer) && 369 FAIL_TEST ((event->details.peer_connect.peer1 == peer1.peer) &&
369 (event->details.peer_connect.peer2 == peer2.peer)); 370 (event->details.peer_connect.peer2 == peer2.peer));
370 GNUNET_TESTBED_operation_done (common_operation); 371 GNUNET_TESTBED_operation_done (common_operation);
371 common_operation = NULL; 372 common_operation = NULL;
372 result = PEERS_CONNECTED; 373 result = PEERS_CONNECTED;
373 LOG (GNUNET_ERROR_TYPE_DEBUG, "Peers connected\n"); 374 LOG (GNUNET_ERROR_TYPE_DEBUG, "Peers connected\n");
374 delayed_connect_task = 375 delayed_connect_task =
375 GNUNET_SCHEDULER_add_delayed (TIME_REL_SECS (3), 376 GNUNET_SCHEDULER_add_delayed (TIME_REL_SECS (3), &do_delayed_connect,
376 &do_delayed_connect, NULL); 377 NULL);
377 break; 378 break;
378 case PEERS_CONNECTED: 379 case PEERS_CONNECTED:
379 FAIL_TEST (NULL == peer1.operation); 380 FAIL_TEST (NULL == peer1.operation);