diff options
author | Maximilian Szengel <gnunet@maxsz.de> | 2012-10-08 17:18:35 +0000 |
---|---|---|
committer | Maximilian Szengel <gnunet@maxsz.de> | 2012-10-08 17:18:35 +0000 |
commit | 6bb9b0a55899c5c7a48b300ae970613abacece4c (patch) | |
tree | 6d637c067db99322bb50eae3e4be3c5fa7017b54 /src/regex | |
parent | a514e1b40566226d87ffdd95a51df47b7613fd95 (diff) | |
download | gnunet-6bb9b0a55899c5c7a48b300ae970613abacece4c.tar.gz gnunet-6bb9b0a55899c5c7a48b300ae970613abacece4c.zip |
mesh service connect skeleton
Diffstat (limited to 'src/regex')
-rw-r--r-- | src/regex/test_regex_big.c | 303 |
1 files changed, 130 insertions, 173 deletions
diff --git a/src/regex/test_regex_big.c b/src/regex/test_regex_big.c index 45efe0e88..457a358b4 100644 --- a/src/regex/test_regex_big.c +++ b/src/regex/test_regex_big.c | |||
@@ -57,26 +57,6 @@ struct PeerData | |||
57 | struct GNUNET_TESTBED_Peer *peer; | 57 | struct GNUNET_TESTBED_Peer *peer; |
58 | 58 | ||
59 | /** | 59 | /** |
60 | * Peer's stream socket | ||
61 | */ | ||
62 | struct GNUNET_STREAM_Socket *socket; | ||
63 | |||
64 | /** | ||
65 | * Peer's io write handle | ||
66 | */ | ||
67 | struct GNUNET_STREAM_IOWriteHandle *io_write_handle; | ||
68 | |||
69 | /** | ||
70 | * Peer's io read handle | ||
71 | */ | ||
72 | struct GNUNET_STREAM_IOReadHandle *io_read_handle; | ||
73 | |||
74 | /** | ||
75 | * Peer's shutdown handle | ||
76 | */ | ||
77 | struct GNUNET_STREAM_ShutdownHandle *shutdown_handle; | ||
78 | |||
79 | /** | ||
80 | * The service connect operation to stream | 60 | * The service connect operation to stream |
81 | */ | 61 | */ |
82 | struct GNUNET_TESTBED_Operation *op; | 62 | struct GNUNET_TESTBED_Operation *op; |
@@ -85,16 +65,6 @@ struct PeerData | |||
85 | * Our Peer id | 65 | * Our Peer id |
86 | */ | 66 | */ |
87 | struct GNUNET_PeerIdentity our_id; | 67 | struct GNUNET_PeerIdentity our_id; |
88 | |||
89 | /** | ||
90 | * Bytes the peer has written | ||
91 | */ | ||
92 | unsigned int bytes_wrote; | ||
93 | |||
94 | /** | ||
95 | * Byte the peer has read | ||
96 | */ | ||
97 | unsigned int bytes_read; | ||
98 | }; | 68 | }; |
99 | 69 | ||
100 | 70 | ||
@@ -157,7 +127,7 @@ static unsigned int peers_started; | |||
157 | /** | 127 | /** |
158 | * The master controller host | 128 | * The master controller host |
159 | */ | 129 | */ |
160 | struct GNUNET_TESTBED_Host* master_host; | 130 | struct GNUNET_TESTBED_Host *master_host; |
161 | 131 | ||
162 | /** | 132 | /** |
163 | * The master controller process | 133 | * The master controller process |
@@ -173,7 +143,7 @@ static struct GNUNET_TESTBED_Controller *master_ctrl; | |||
173 | * Slave host IP addresses | 143 | * Slave host IP addresses |
174 | */ | 144 | */ |
175 | 145 | ||
176 | static char *slave_ips[NUM_HOSTS] = {"192.168.1.33", "192.168.1.34"}; | 146 | static char *slave_ips[NUM_HOSTS] = { "192.168.1.33", "192.168.1.34" }; |
177 | 147 | ||
178 | /** | 148 | /** |
179 | * The slave hosts | 149 | * The slave hosts |
@@ -361,44 +331,6 @@ do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
361 | 331 | ||
362 | 332 | ||
363 | /** | 333 | /** |
364 | * Controller event callback | ||
365 | * | ||
366 | * @param cls NULL | ||
367 | * @param event the controller event | ||
368 | */ | ||
369 | // static void | ||
370 | // controller_event_cb (void *cls, | ||
371 | // const struct GNUNET_TESTBED_EventInformation *event) | ||
372 | // { | ||
373 | // switch (event->type) | ||
374 | // { | ||
375 | // case GNUNET_TESTBED_ET_CONNECT: | ||
376 | // GNUNET_assert (INIT == setup_state); | ||
377 | // GNUNET_TESTBED_operation_done (op); | ||
378 | // /* Get the peer identity and configuration of peers */ | ||
379 | // op = GNUNET_TESTBED_peer_get_information (peer1.peer, | ||
380 | // GNUNET_TESTBED_PIT_IDENTITY, | ||
381 | // &peerinfo_cb, NULL); | ||
382 | // setup_state = PEER1_GET_IDENTITY; | ||
383 | // break; | ||
384 | // case GNUNET_TESTBED_ET_OPERATION_FINISHED: | ||
385 | // switch (setup_state) | ||
386 | // { | ||
387 | // case PEER1_STREAM_CONNECT: | ||
388 | // case PEER2_STREAM_CONNECT: | ||
389 | // GNUNET_assert (NULL == event->details.operation_finished.emsg); | ||
390 | // break; | ||
391 | // default: | ||
392 | // GNUNET_assert (0); | ||
393 | // } | ||
394 | // break; | ||
395 | // default: | ||
396 | // GNUNET_assert (0); | ||
397 | // } | ||
398 | // } | ||
399 | |||
400 | |||
401 | /** | ||
402 | * Signature of a main function for a testcase. | 334 | * Signature of a main function for a testcase. |
403 | * | 335 | * |
404 | * @param cls closure | 336 | * @param cls closure |
@@ -422,6 +354,33 @@ do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
422 | // NULL); | 354 | // NULL); |
423 | // } | 355 | // } |
424 | 356 | ||
357 | void | ||
358 | mesh_connect_cb (void *cls, struct GNUNET_TESTBED_Operation *op, | ||
359 | void *ca_result, const char *emsg) | ||
360 | { | ||
361 | long i = (long) cls; | ||
362 | |||
363 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh connect callback for peer %i\n", | ||
364 | i); | ||
365 | } | ||
366 | |||
367 | |||
368 | void * | ||
369 | mesh_ca (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg) | ||
370 | { | ||
371 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh connect adapter\n"); | ||
372 | |||
373 | return NULL; | ||
374 | } | ||
375 | |||
376 | |||
377 | void | ||
378 | mesh_da (void *cls, void *op_result) | ||
379 | { | ||
380 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh disconnect adapter\n"); | ||
381 | } | ||
382 | |||
383 | |||
425 | /** | 384 | /** |
426 | * Functions of this signature are called when a peer has been successfully | 385 | * Functions of this signature are called when a peer has been successfully |
427 | * started or stopped. | 386 | * started or stopped. |
@@ -434,7 +393,8 @@ peer_start_cb (void *cls, const char *emsg) | |||
434 | { | 393 | { |
435 | unsigned int cnt; | 394 | unsigned int cnt; |
436 | long i = (long) cls; | 395 | long i = (long) cls; |
437 | GNUNET_TESTBED_operation_done(op[i]); | 396 | |
397 | GNUNET_TESTBED_operation_done (op[i]); | ||
438 | peers_started++; | 398 | peers_started++; |
439 | // FIXME create and start rest of PEERS_PER_HOST | 399 | // FIXME create and start rest of PEERS_PER_HOST |
440 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " %u peer(s) started\n", peers_started); | 400 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " %u peer(s) started\n", peers_started); |
@@ -447,9 +407,9 @@ peer_start_cb (void *cls, const char *emsg) | |||
447 | for (cnt = 0; cnt < NUM_HOSTS - 1; cnt++) | 407 | for (cnt = 0; cnt < NUM_HOSTS - 1; cnt++) |
448 | { | 408 | { |
449 | state[cnt] = LINKING_SLAVES; | 409 | state[cnt] = LINKING_SLAVES; |
450 | op[cnt] = GNUNET_TESTBED_get_slave_config ((void*) (long)cnt, | 410 | op[cnt] = |
451 | master_ctrl, | 411 | GNUNET_TESTBED_get_slave_config ((void *) (long) cnt, master_ctrl, |
452 | slave_hosts[cnt+1]); | 412 | slave_hosts[cnt + 1]); |
453 | } | 413 | } |
454 | } | 414 | } |
455 | } | 415 | } |
@@ -471,7 +431,7 @@ peer_create_cb (void *cls, struct GNUNET_TESTBED_Peer *peer, const char *emsg) | |||
471 | long peer_id; | 431 | long peer_id; |
472 | 432 | ||
473 | // GNUNET_TESTBED_operation_done(op[i]); | 433 | // GNUNET_TESTBED_operation_done(op[i]); |
474 | peer_id = i; // FIXME A * i + B | 434 | peer_id = i; // FIXME A * i + B |
475 | peers[peer_id] = peer; | 435 | peers[peer_id] = peer; |
476 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Peer %i created\n", peer_id); | 436 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Peer %i created\n", peer_id); |
477 | op[i] = GNUNET_TESTBED_peer_start (peer, peer_start_cb, (void *) i); | 437 | op[i] = GNUNET_TESTBED_peer_start (peer, peer_start_cb, (void *) i); |
@@ -503,7 +463,11 @@ controller_cb (void *cls, const struct GNUNET_TESTBED_EventInformation *event) | |||
503 | break; | 463 | break; |
504 | case GNUNET_TESTBED_ET_CONNECT: | 464 | case GNUNET_TESTBED_ET_CONNECT: |
505 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Overlay Connected\n"); | 465 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Overlay Connected\n"); |
506 | 466 | for (i = 0; i < TOTAL_PEERS; i++) | |
467 | { | ||
468 | GNUNET_TESTBED_service_connect (NULL, peers[i], "mesh", &mesh_connect_cb, | ||
469 | (void *) i, &mesh_ca, &mesh_da, NULL); | ||
470 | } | ||
507 | break; | 471 | break; |
508 | case GNUNET_TESTBED_ET_OPERATION_FINISHED: | 472 | case GNUNET_TESTBED_ET_OPERATION_FINISHED: |
509 | if (NULL != event->details.operation_finished.emsg) | 473 | if (NULL != event->details.operation_finished.emsg) |
@@ -516,71 +480,75 @@ controller_cb (void *cls, const struct GNUNET_TESTBED_EventInformation *event) | |||
516 | i = (long) event->details.operation_finished.op_cls; | 480 | i = (long) event->details.operation_finished.op_cls; |
517 | switch (state[i]) | 481 | switch (state[i]) |
518 | { | 482 | { |
519 | case INIT: | 483 | case INIT: |
520 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Init: %u\n", i); | 484 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Init: %u\n", i); |
521 | GNUNET_TESTBED_operation_done (event->details.operation_finished.operation); | 485 | GNUNET_TESTBED_operation_done (event->details. |
522 | op[i] = NULL; | 486 | operation_finished.operation); |
523 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Operation %u finished\n", i); | 487 | op[i] = NULL; |
524 | break; | 488 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Operation %u finished\n", i); |
525 | case LINKING: | 489 | break; |
526 | GNUNET_TESTBED_operation_done (event->details.operation_finished.operation); | 490 | case LINKING: |
527 | op[i] = NULL; | 491 | GNUNET_TESTBED_operation_done (event->details. |
528 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Operation %u finished\n", i); | 492 | operation_finished.operation); |
529 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Linked host %i\n", i); | 493 | op[i] = NULL; |
530 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Creating peer...\n"); | 494 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Operation %u finished\n", i); |
531 | 495 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Linked host %i\n", i); | |
532 | state[i] = CREATING_PEER; | 496 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Creating peer...\n"); |
533 | op[i] = GNUNET_TESTBED_peer_create (master_ctrl, | 497 | |
534 | slave_hosts[i], | 498 | state[i] = CREATING_PEER; |
535 | cfg, | 499 | op[i] = |
536 | peer_create_cb, | 500 | GNUNET_TESTBED_peer_create (master_ctrl, slave_hosts[i], cfg, |
537 | (void *) i); | 501 | peer_create_cb, (void *) i); |
538 | break; | 502 | break; |
539 | case CREATING_PEER: | 503 | case CREATING_PEER: |
540 | GNUNET_TESTBED_operation_done (event->details.operation_finished.operation); | 504 | GNUNET_TESTBED_operation_done (event->details. |
541 | op[i] = NULL; | 505 | operation_finished.operation); |
542 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Operation %u finished\n", i); | 506 | op[i] = NULL; |
543 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Peer create\n"); | 507 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Operation %u finished\n", i); |
544 | break; | 508 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Peer create\n"); |
545 | case LINKING_SLAVES: | 509 | break; |
546 | { | 510 | case LINKING_SLAVES: |
547 | struct GNUNET_CONFIGURATION_Handle *slave_cfg; | 511 | { |
548 | GNUNET_assert (NULL != event->details.operation_finished.generic); | 512 | struct GNUNET_CONFIGURATION_Handle *slave_cfg; |
549 | slave_cfg = GNUNET_CONFIGURATION_dup ((struct GNUNET_CONFIGURATION_Handle *)event->details.operation_finished.generic); | 513 | |
550 | GNUNET_TESTBED_operation_done (event->details.operation_finished.operation); | 514 | GNUNET_assert (NULL != event->details.operation_finished.generic); |
551 | op[i] = NULL; | 515 | slave_cfg = |
552 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Operation %u finished\n", i); | 516 | GNUNET_CONFIGURATION_dup ((struct GNUNET_CONFIGURATION_Handle *) |
553 | state[i] = LINKING_SLAVES_SUCCESS; | 517 | event->details.operation_finished.generic); |
554 | op[i] = GNUNET_TESTBED_controller_link ((void *) (long) i, | 518 | GNUNET_TESTBED_operation_done (event->details. |
555 | master_ctrl, | 519 | operation_finished.operation); |
556 | slave_hosts[i+1], | 520 | op[i] = NULL; |
557 | slave_hosts[i], | 521 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Operation %u finished\n", i); |
558 | slave_cfg, | 522 | state[i] = LINKING_SLAVES_SUCCESS; |
559 | GNUNET_NO); | 523 | op[i] = |
560 | GNUNET_CONFIGURATION_destroy (slave_cfg); | 524 | GNUNET_TESTBED_controller_link ((void *) (long) i, master_ctrl, |
561 | break; | 525 | slave_hosts[i + 1], slave_hosts[i], |
562 | } | 526 | slave_cfg, GNUNET_NO); |
563 | case LINKING_SLAVES_SUCCESS: | 527 | GNUNET_CONFIGURATION_destroy (slave_cfg); |
564 | GNUNET_TESTBED_operation_done (event->details.operation_finished.operation); | 528 | break; |
565 | op[i] = NULL; | 529 | } |
566 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Operation %u finished\n", i); | 530 | case LINKING_SLAVES_SUCCESS: |
567 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Linking slave %i succeeded\n", i); | 531 | GNUNET_TESTBED_operation_done (event->details. |
568 | state[0] = CONNECTING_PEERS; | 532 | operation_finished.operation); |
569 | op[0] = GNUNET_TESTBED_overlay_configure_topology (NULL, | 533 | op[i] = NULL; |
570 | TOTAL_PEERS, | 534 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Operation %u finished\n", i); |
571 | peers, | 535 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Linking slave %i succeeded\n", i); |
572 | GNUNET_TESTBED_TOPOLOGY_LINE); | 536 | state[0] = CONNECTING_PEERS; |
573 | GNUNET_assert (NULL != op[0]); | 537 | op[0] = |
574 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connecting peers...\n"); | 538 | GNUNET_TESTBED_overlay_configure_topology (NULL, TOTAL_PEERS, peers, |
575 | break; | 539 | GNUNET_TESTBED_TOPOLOGY_LINE); |
576 | case CONNECTING_PEERS: | 540 | GNUNET_assert (NULL != op[0]); |
577 | GNUNET_TESTBED_operation_done (event->details.operation_finished.operation); | 541 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connecting peers...\n"); |
578 | op[i] = NULL; | 542 | break; |
579 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Operation %u finished\n", i); | 543 | case CONNECTING_PEERS: |
580 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected\n"); | 544 | GNUNET_TESTBED_operation_done (event->details. |
581 | break; | 545 | operation_finished.operation); |
582 | default: | 546 | op[i] = NULL; |
583 | GNUNET_break (0); | 547 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Operation %u finished\n", i); |
548 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected\n"); | ||
549 | break; | ||
550 | default: | ||
551 | GNUNET_break (0); | ||
584 | } | 552 | } |
585 | break; | 553 | break; |
586 | default: | 554 | default: |
@@ -603,15 +571,11 @@ registration_cont (void *cls, const char *emsg) | |||
603 | GNUNET_assert (0); | 571 | GNUNET_assert (0); |
604 | } | 572 | } |
605 | state[host_registered] = LINKING; | 573 | state[host_registered] = LINKING; |
606 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 574 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Linking host %u\n", host_registered); |
607 | " Linking host %u\n", host_registered); | 575 | op[host_registered] = |
608 | op[host_registered] = GNUNET_TESTBED_controller_link ((void *) (long) | 576 | GNUNET_TESTBED_controller_link ((void *) (long) host_registered, |
609 | host_registered, | 577 | master_ctrl, slave_hosts[host_registered], |
610 | master_ctrl, | 578 | NULL, cfg, GNUNET_YES); |
611 | slave_hosts[host_registered], | ||
612 | NULL, | ||
613 | cfg, | ||
614 | GNUNET_YES); | ||
615 | host_registered++; | 579 | host_registered++; |
616 | if (NUM_HOSTS != host_registered) | 580 | if (NUM_HOSTS != host_registered) |
617 | { | 581 | { |
@@ -619,8 +583,7 @@ registration_cont (void *cls, const char *emsg) | |||
619 | host_registered); | 583 | host_registered); |
620 | rh = GNUNET_TESTBED_register_host (master_ctrl, | 584 | rh = GNUNET_TESTBED_register_host (master_ctrl, |
621 | slave_hosts[host_registered], | 585 | slave_hosts[host_registered], |
622 | ®istration_cont, | 586 | ®istration_cont, NULL); |
623 | NULL); | ||
624 | return; | 587 | return; |
625 | } | 588 | } |
626 | } | 589 | } |
@@ -649,11 +612,9 @@ status_cb (void *cls, const struct GNUNET_CONFIGURATION_Handle *config, | |||
649 | event_mask |= (1L << GNUNET_TESTBED_ET_CONNECT); | 612 | event_mask |= (1L << GNUNET_TESTBED_ET_CONNECT); |
650 | event_mask |= (1L << GNUNET_TESTBED_ET_OPERATION_FINISHED); | 613 | event_mask |= (1L << GNUNET_TESTBED_ET_OPERATION_FINISHED); |
651 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connecting to master controller\n"); | 614 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connecting to master controller\n"); |
652 | master_ctrl = GNUNET_TESTBED_controller_connect (config, | 615 | master_ctrl = |
653 | master_host, | 616 | GNUNET_TESTBED_controller_connect (config, master_host, event_mask, |
654 | event_mask, | 617 | &controller_cb, NULL); |
655 | &controller_cb, | ||
656 | NULL); | ||
657 | GNUNET_assert (NULL != master_ctrl); | 618 | GNUNET_assert (NULL != master_ctrl); |
658 | 619 | ||
659 | for (i = 0; i < NUM_HOSTS; i++) | 620 | for (i = 0; i < NUM_HOSTS; i++) |
@@ -663,11 +624,10 @@ status_cb (void *cls, const struct GNUNET_CONFIGURATION_Handle *config, | |||
663 | GNUNET_assert (NULL != slave_hosts[i]); | 624 | GNUNET_assert (NULL != slave_hosts[i]); |
664 | } | 625 | } |
665 | host_registered = 0; | 626 | host_registered = 0; |
666 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 627 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Registering host %u\n", |
667 | " Registering host %u\n", host_registered); | 628 | host_registered); |
668 | rh = GNUNET_TESTBED_register_host (master_ctrl, slave_hosts[0], | 629 | rh = GNUNET_TESTBED_register_host (master_ctrl, slave_hosts[0], |
669 | ®istration_cont, | 630 | ®istration_cont, NULL); |
670 | NULL); | ||
671 | GNUNET_assert (NULL != rh); | 631 | GNUNET_assert (NULL != rh); |
672 | } | 632 | } |
673 | 633 | ||
@@ -688,11 +648,9 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
688 | GNUNET_assert (NULL != master_host); | 648 | GNUNET_assert (NULL != master_host); |
689 | cfg = GNUNET_CONFIGURATION_dup (config); | 649 | cfg = GNUNET_CONFIGURATION_dup (config); |
690 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting master controller\n"); | 650 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting master controller\n"); |
691 | master_proc = GNUNET_TESTBED_controller_start ("192.168.1.33", | 651 | master_proc = |
692 | master_host, | 652 | GNUNET_TESTBED_controller_start ("192.168.1.33", master_host, cfg, |
693 | cfg, | 653 | status_cb, NULL); |
694 | status_cb, | ||
695 | NULL); | ||
696 | abort_task = | 654 | abort_task = |
697 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 655 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
698 | (GNUNET_TIME_UNIT_MINUTES, 60), &do_abort, | 656 | (GNUNET_TIME_UNIT_MINUTES, 60), &do_abort, |
@@ -702,7 +660,8 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
702 | /** | 660 | /** |
703 | * Main function | 661 | * Main function |
704 | */ | 662 | */ |
705 | int main (int argc, char **argv) | 663 | int |
664 | main (int argc, char **argv) | ||
706 | { | 665 | { |
707 | int ret; | 666 | int ret; |
708 | int test_hosts; | 667 | int test_hosts; |
@@ -729,8 +688,8 @@ int main (int argc, char **argv) | |||
729 | 688 | ||
730 | fprintf (stderr, "Testing host %i\n", i); | 689 | fprintf (stderr, "Testing host %i\n", i); |
731 | auxp = | 690 | auxp = |
732 | GNUNET_OS_start_process_vap (GNUNET_NO, GNUNET_OS_INHERIT_STD_ALL, NULL, | 691 | GNUNET_OS_start_process_vap (GNUNET_NO, GNUNET_OS_INHERIT_STD_ALL, NULL, |
733 | NULL, "ssh", remote_args); | 692 | NULL, "ssh", remote_args); |
734 | GNUNET_assert (NULL != auxp); | 693 | GNUNET_assert (NULL != auxp); |
735 | do | 694 | do |
736 | { | 695 | { |
@@ -745,8 +704,7 @@ int main (int argc, char **argv) | |||
745 | { | 704 | { |
746 | fprintf (stderr, | 705 | fprintf (stderr, |
747 | "Unable to run the test as this system is not configured " | 706 | "Unable to run the test as this system is not configured " |
748 | "to use password less SSH logins to host %s.\n", | 707 | "to use password less SSH logins to host %s.\n", slave_ips[i]); |
749 | slave_ips[i]); | ||
750 | test_hosts = GNUNET_SYSERR; | 708 | test_hosts = GNUNET_SYSERR; |
751 | } | 709 | } |
752 | } | 710 | } |
@@ -761,8 +719,7 @@ int main (int argc, char **argv) | |||
761 | 719 | ||
762 | ret = | 720 | ret = |
763 | GNUNET_PROGRAM_run ((sizeof (argv2) / sizeof (char *)) - 1, argv2, | 721 | GNUNET_PROGRAM_run ((sizeof (argv2) / sizeof (char *)) - 1, argv2, |
764 | "test_regex_big", "nohelp", options, | 722 | "test_regex_big", "nohelp", options, &run, NULL); |
765 | &run, NULL); | ||
766 | 723 | ||
767 | fprintf (stderr, "END.\n"); | 724 | fprintf (stderr, "END.\n"); |
768 | 725 | ||