diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2013-05-04 05:50:31 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2013-05-04 05:50:31 +0000 |
commit | 460223a5a382c80881b4fb01b17e592d98af0a39 (patch) | |
tree | bdac0b9f37ca05ad3c127be58cccab1a97b0a7ce | |
parent | cd72d5c554e8178b6da1897caa5ff930b51c8a2c (diff) | |
download | gnunet-460223a5a382c80881b4fb01b17e592d98af0a39.tar.gz gnunet-460223a5a382c80881b4fb01b17e592d98af0a39.zip |
- remove unused configuration parameter in GNUNET_TESTBED_controller_link()
-rw-r--r-- | src/include/gnunet_testbed_service.h | 3 | ||||
-rw-r--r-- | src/testbed/gnunet-service-testbed_links.c | 6 | ||||
-rw-r--r-- | src/testbed/gnunet-service-testbed_oc.c | 8 | ||||
-rw-r--r-- | src/testbed/test_testbed_api_3peers_3controllers.c | 4 | ||||
-rw-r--r-- | src/testbed/test_testbed_api_controllerlink.c | 12 | ||||
-rw-r--r-- | src/testbed/testbed_api.c | 7 | ||||
-rw-r--r-- | src/testbed/testbed_api_testbed.c | 2 |
7 files changed, 12 insertions, 30 deletions
diff --git a/src/include/gnunet_testbed_service.h b/src/include/gnunet_testbed_service.h index f19122978..a68f99f31 100644 --- a/src/include/gnunet_testbed_service.h +++ b/src/include/gnunet_testbed_service.h | |||
@@ -600,7 +600,6 @@ typedef void (*GNUNET_TESTBED_OperationCompletionCallback) (void *cls, | |||
600 | * @param delegated_host requests to which host should be delegated; cannot be NULL | 600 | * @param delegated_host requests to which host should be delegated; cannot be NULL |
601 | * @param slave_host which host is used to run the slave controller; use NULL to | 601 | * @param slave_host which host is used to run the slave controller; use NULL to |
602 | * make the master controller connect to the delegated host | 602 | * make the master controller connect to the delegated host |
603 | * @param slave_cfg configuration to use for the slave controller | ||
604 | * @param is_subordinate GNUNET_YES if the controller at delegated_host should | 603 | * @param is_subordinate GNUNET_YES if the controller at delegated_host should |
605 | * be started by the slave controller; GNUNET_NO if the slave | 604 | * be started by the slave controller; GNUNET_NO if the slave |
606 | * controller has to connect to the already started delegated | 605 | * controller has to connect to the already started delegated |
@@ -612,8 +611,6 @@ GNUNET_TESTBED_controller_link (void *op_cls, | |||
612 | struct GNUNET_TESTBED_Controller *master, | 611 | struct GNUNET_TESTBED_Controller *master, |
613 | struct GNUNET_TESTBED_Host *delegated_host, | 612 | struct GNUNET_TESTBED_Host *delegated_host, |
614 | struct GNUNET_TESTBED_Host *slave_host, | 613 | struct GNUNET_TESTBED_Host *slave_host, |
615 | const struct GNUNET_CONFIGURATION_Handle | ||
616 | *slave_cfg, | ||
617 | int is_subordinate); | 614 | int is_subordinate); |
618 | 615 | ||
619 | 616 | ||
diff --git a/src/testbed/gnunet-service-testbed_links.c b/src/testbed/gnunet-service-testbed_links.c index 0c89392de..6209bf248 100644 --- a/src/testbed/gnunet-service-testbed_links.c +++ b/src/testbed/gnunet-service-testbed_links.c | |||
@@ -587,7 +587,6 @@ lcf_proc_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
587 | lcf->gateway->controller, | 587 | lcf->gateway->controller, |
588 | GST_host_list[lcf->delegated_host_id], | 588 | GST_host_list[lcf->delegated_host_id], |
589 | GST_host_list[lcf->slave_host_id], | 589 | GST_host_list[lcf->slave_host_id], |
590 | NULL, | ||
591 | lcf->is_subordinate); | 590 | lcf->is_subordinate); |
592 | lcf->timeout_task = | 591 | lcf->timeout_task = |
593 | GNUNET_SCHEDULER_add_delayed (GST_timeout, &lcf_forwarded_operation_timeout, | 592 | GNUNET_SCHEDULER_add_delayed (GST_timeout, &lcf_forwarded_operation_timeout, |
@@ -621,7 +620,6 @@ slave_event_callback (void *cls, | |||
621 | { | 620 | { |
622 | struct RegisteredHostContext *rhc; | 621 | struct RegisteredHostContext *rhc; |
623 | struct LCFContext *lcf; | 622 | struct LCFContext *lcf; |
624 | struct GNUNET_CONFIGURATION_Handle *cfg; | ||
625 | struct GNUNET_TESTBED_Operation *old_op; | 623 | struct GNUNET_TESTBED_Operation *old_op; |
626 | 624 | ||
627 | /* We currently only get here when working on RegisteredHostContexts and | 625 | /* We currently only get here when working on RegisteredHostContexts and |
@@ -634,13 +632,11 @@ slave_event_callback (void *cls, | |||
634 | switch (rhc->state) | 632 | switch (rhc->state) |
635 | { | 633 | { |
636 | case RHC_GET_CFG: | 634 | case RHC_GET_CFG: |
637 | cfg = event->details.operation_finished.generic; | ||
638 | old_op = rhc->sub_op; | 635 | old_op = rhc->sub_op; |
639 | rhc->state = RHC_LINK; | 636 | rhc->state = RHC_LINK; |
640 | rhc->sub_op = | 637 | rhc->sub_op = |
641 | GNUNET_TESTBED_controller_link (rhc, rhc->gateway->controller, | 638 | GNUNET_TESTBED_controller_link (rhc, rhc->gateway->controller, |
642 | rhc->reg_host, rhc->host, cfg, | 639 | rhc->reg_host, rhc->host, GNUNET_NO); |
643 | GNUNET_NO); | ||
644 | GNUNET_TESTBED_operation_done (old_op); | 640 | GNUNET_TESTBED_operation_done (old_op); |
645 | break; | 641 | break; |
646 | case RHC_LINK: | 642 | case RHC_LINK: |
diff --git a/src/testbed/gnunet-service-testbed_oc.c b/src/testbed/gnunet-service-testbed_oc.c index 7913b0f49..c53bec007 100644 --- a/src/testbed/gnunet-service-testbed_oc.c +++ b/src/testbed/gnunet-service-testbed_oc.c | |||
@@ -1138,7 +1138,6 @@ static void | |||
1138 | registeredhost_registration_completion (void *cls, const char *emsg) | 1138 | registeredhost_registration_completion (void *cls, const char *emsg) |
1139 | { | 1139 | { |
1140 | struct RegisteredHostContext *rhc = cls; | 1140 | struct RegisteredHostContext *rhc = cls; |
1141 | const struct GNUNET_CONFIGURATION_Handle *cfg; | ||
1142 | uint32_t peer2_host_id; | 1141 | uint32_t peer2_host_id; |
1143 | 1142 | ||
1144 | peer2_host_id = GNUNET_TESTBED_host_get_id_ (rhc->reg_host); | 1143 | peer2_host_id = GNUNET_TESTBED_host_get_id_ (rhc->reg_host); |
@@ -1149,14 +1148,9 @@ registeredhost_registration_completion (void *cls, const char *emsg) | |||
1149 | && (NULL != GST_host_list[peer2_host_id]) ) ) | 1148 | && (NULL != GST_host_list[peer2_host_id]) ) ) |
1150 | { | 1149 | { |
1151 | rhc->state = RHC_LINK; | 1150 | rhc->state = RHC_LINK; |
1152 | cfg = | ||
1153 | (NULL == | ||
1154 | rhc->gateway2) ? our_config | ||
1155 | : GNUNET_TESTBED_host_get_cfg_ (GST_host_list[peer2_host_id]); | ||
1156 | rhc->sub_op = | 1151 | rhc->sub_op = |
1157 | GNUNET_TESTBED_controller_link (rhc, rhc->gateway->controller, | 1152 | GNUNET_TESTBED_controller_link (rhc, rhc->gateway->controller, |
1158 | rhc->reg_host, rhc->host, cfg, | 1153 | rhc->reg_host, rhc->host, GNUNET_NO); |
1159 | GNUNET_NO); | ||
1160 | return; | 1154 | return; |
1161 | } | 1155 | } |
1162 | rhc->state = RHC_GET_CFG; | 1156 | rhc->state = RHC_GET_CFG; |
diff --git a/src/testbed/test_testbed_api_3peers_3controllers.c b/src/testbed/test_testbed_api_3peers_3controllers.c index 752d7e872..6d88490c1 100644 --- a/src/testbed/test_testbed_api_3peers_3controllers.c +++ b/src/testbed/test_testbed_api_3peers_3controllers.c | |||
@@ -566,7 +566,7 @@ controller_cb (void *cls, const struct GNUNET_TESTBED_EventInformation *event) | |||
566 | result = PEER1_STARTED; | 566 | result = PEER1_STARTED; |
567 | common_operation = | 567 | common_operation = |
568 | GNUNET_TESTBED_controller_link (NULL, controller1, neighbour1, NULL, | 568 | GNUNET_TESTBED_controller_link (NULL, controller1, neighbour1, NULL, |
569 | cfg, GNUNET_YES); | 569 | GNUNET_YES); |
570 | break; | 570 | break; |
571 | case PEER2_CREATED: | 571 | case PEER2_CREATED: |
572 | if (event->details.peer_start.host != neighbour1) | 572 | if (event->details.peer_start.host != neighbour1) |
@@ -587,7 +587,7 @@ controller_cb (void *cls, const struct GNUNET_TESTBED_EventInformation *event) | |||
587 | } | 587 | } |
588 | common_operation = | 588 | common_operation = |
589 | GNUNET_TESTBED_controller_link (NULL, controller1, neighbour2, NULL, | 589 | GNUNET_TESTBED_controller_link (NULL, controller1, neighbour2, NULL, |
590 | cfg, GNUNET_YES); | 590 | GNUNET_YES); |
591 | if (NULL == common_operation) | 591 | if (NULL == common_operation) |
592 | { | 592 | { |
593 | GNUNET_break (0); | 593 | GNUNET_break (0); |
diff --git a/src/testbed/test_testbed_api_controllerlink.c b/src/testbed/test_testbed_api_controllerlink.c index 030b65117..c5fae9257 100644 --- a/src/testbed/test_testbed_api_controllerlink.c +++ b/src/testbed/test_testbed_api_controllerlink.c | |||
@@ -525,8 +525,7 @@ controller_cb (void *cls, const struct GNUNET_TESTBED_EventInformation *event) | |||
525 | FAIL_TEST (event->details.peer_start.peer == slave1_peer); | 525 | FAIL_TEST (event->details.peer_start.peer == slave1_peer); |
526 | GNUNET_TESTBED_operation_done (op); | 526 | GNUNET_TESTBED_operation_done (op); |
527 | result = SLAVE1_PEER_START_SUCCESS; | 527 | result = SLAVE1_PEER_START_SUCCESS; |
528 | op = GNUNET_TESTBED_controller_link (NULL, mc, slave2, slave, cfg, | 528 | op = GNUNET_TESTBED_controller_link (NULL, mc, slave2, slave, GNUNET_YES); |
529 | GNUNET_YES); | ||
530 | break; | 529 | break; |
531 | case SLAVE2_PEER_CREATE_SUCCESS: | 530 | case SLAVE2_PEER_CREATE_SUCCESS: |
532 | FAIL_TEST (GNUNET_TESTBED_ET_PEER_STOP == event->type); | 531 | FAIL_TEST (GNUNET_TESTBED_ET_PEER_STOP == event->type); |
@@ -613,8 +612,7 @@ controller_cb (void *cls, const struct GNUNET_TESTBED_EventInformation *event) | |||
613 | cfg3 = GNUNET_CONFIGURATION_dup (event->details.operation_finished.generic); | 612 | cfg3 = GNUNET_CONFIGURATION_dup (event->details.operation_finished.generic); |
614 | GNUNET_TESTBED_operation_done (op); | 613 | GNUNET_TESTBED_operation_done (op); |
615 | result = SLAVE3_GET_CONFIG_SUCCESS; | 614 | result = SLAVE3_GET_CONFIG_SUCCESS; |
616 | op = GNUNET_TESTBED_controller_link (NULL, mc, slave3, slave, cfg3, | 615 | op = GNUNET_TESTBED_controller_link (NULL, mc, slave3, slave, GNUNET_NO); |
617 | GNUNET_NO); | ||
618 | break; | 616 | break; |
619 | case SLAVE3_REGISTERED: | 617 | case SLAVE3_REGISTERED: |
620 | check_operation_success (event); | 618 | check_operation_success (event); |
@@ -670,8 +668,7 @@ registration_cont (void *cls, const char *emsg) | |||
670 | FAIL_TEST (NULL != mc); | 668 | FAIL_TEST (NULL != mc); |
671 | result = SLAVE2_REGISTERED; | 669 | result = SLAVE2_REGISTERED; |
672 | FAIL_TEST (NULL != cfg); | 670 | FAIL_TEST (NULL != cfg); |
673 | op = GNUNET_TESTBED_controller_link (NULL, mc, slave, NULL, cfg, | 671 | op = GNUNET_TESTBED_controller_link (NULL, mc, slave, NULL, GNUNET_YES); |
674 | GNUNET_YES); | ||
675 | FAIL_TEST (NULL != op); | 672 | FAIL_TEST (NULL != op); |
676 | break; | 673 | break; |
677 | case MASTER_SLAVE2_PEERS_CONNECTED: | 674 | case MASTER_SLAVE2_PEERS_CONNECTED: |
@@ -679,8 +676,7 @@ registration_cont (void *cls, const char *emsg) | |||
679 | FAIL_TEST (NULL != mc); | 676 | FAIL_TEST (NULL != mc); |
680 | FAIL_TEST (NULL == op); | 677 | FAIL_TEST (NULL == op); |
681 | result = SLAVE3_REGISTERED; | 678 | result = SLAVE3_REGISTERED; |
682 | op = GNUNET_TESTBED_controller_link (NULL, mc, slave3, NULL, cfg, | 679 | op = GNUNET_TESTBED_controller_link (NULL, mc, slave3, NULL, GNUNET_YES); |
683 | GNUNET_YES); | ||
684 | FAIL_TEST (NULL != op); | 680 | FAIL_TEST (NULL != op); |
685 | break; | 681 | break; |
686 | default: | 682 | default: |
diff --git a/src/testbed/testbed_api.c b/src/testbed/testbed_api.c index 2df164a02..207f2658f 100644 --- a/src/testbed/testbed_api.c +++ b/src/testbed/testbed_api.c | |||
@@ -1652,7 +1652,6 @@ GNUNET_TESTBED_compress_cfg_ (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
1652 | * @param delegated_host requests to which host should be delegated; cannot be NULL | 1652 | * @param delegated_host requests to which host should be delegated; cannot be NULL |
1653 | * @param slave_host which host is used to run the slave controller; use NULL to | 1653 | * @param slave_host which host is used to run the slave controller; use NULL to |
1654 | * make the master controller connect to the delegated host | 1654 | * make the master controller connect to the delegated host |
1655 | * @param slave_cfg configuration to use for the slave controller | ||
1656 | * @param is_subordinate GNUNET_YES if the controller at delegated_host should | 1655 | * @param is_subordinate GNUNET_YES if the controller at delegated_host should |
1657 | * be started by the slave controller; GNUNET_NO if the slave | 1656 | * be started by the slave controller; GNUNET_NO if the slave |
1658 | * controller has to connect to the already started delegated | 1657 | * controller has to connect to the already started delegated |
@@ -1664,8 +1663,7 @@ GNUNET_TESTBED_controller_link (void *op_cls, | |||
1664 | struct GNUNET_TESTBED_Controller *master, | 1663 | struct GNUNET_TESTBED_Controller *master, |
1665 | struct GNUNET_TESTBED_Host *delegated_host, | 1664 | struct GNUNET_TESTBED_Host *delegated_host, |
1666 | struct GNUNET_TESTBED_Host *slave_host, | 1665 | struct GNUNET_TESTBED_Host *slave_host, |
1667 | const struct GNUNET_CONFIGURATION_Handle | 1666 | int is_subordinate) |
1668 | *slave_cfg, int is_subordinate) | ||
1669 | { | 1667 | { |
1670 | struct OperationContext *opc; | 1668 | struct OperationContext *opc; |
1671 | struct GNUNET_TESTBED_ControllerLinkRequest *msg; | 1669 | struct GNUNET_TESTBED_ControllerLinkRequest *msg; |
@@ -1689,7 +1687,8 @@ GNUNET_TESTBED_controller_link (void *op_cls, | |||
1689 | msg->header.size = htons (msg_size); | 1687 | msg->header.size = htons (msg_size); |
1690 | msg->delegated_host_id = htonl (delegated_host_id); | 1688 | msg->delegated_host_id = htonl (delegated_host_id); |
1691 | msg->slave_host_id = htonl (slave_host_id); | 1689 | msg->slave_host_id = htonl (slave_host_id); |
1692 | msg->is_subordinate = (GNUNET_YES == is_subordinate) ? 1 : 0;data = GNUNET_malloc (sizeof (struct ControllerLinkData)); | 1690 | msg->is_subordinate = (GNUNET_YES == is_subordinate) ? 1 : 0; |
1691 | data = GNUNET_malloc (sizeof (struct ControllerLinkData)); | ||
1693 | data->msg = msg; | 1692 | data->msg = msg; |
1694 | data->host_id = delegated_host_id; | 1693 | data->host_id = delegated_host_id; |
1695 | opc = GNUNET_malloc (sizeof (struct OperationContext)); | 1694 | opc = GNUNET_malloc (sizeof (struct OperationContext)); |
diff --git a/src/testbed/testbed_api_testbed.c b/src/testbed/testbed_api_testbed.c index 09e9cacb5..6e3a83b6f 100644 --- a/src/testbed/testbed_api_testbed.c +++ b/src/testbed/testbed_api_testbed.c | |||
@@ -942,7 +942,7 @@ register_hosts (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
942 | rcop->rc = rc; | 942 | rcop->rc = rc; |
943 | rcop->op = | 943 | rcop->op = |
944 | GNUNET_TESTBED_controller_link (rcop, rc->c, rc->hosts[slave], | 944 | GNUNET_TESTBED_controller_link (rcop, rc->c, rc->hosts[slave], |
945 | rc->h, rc->cfg, GNUNET_YES); | 945 | rc->h, GNUNET_YES); |
946 | GNUNET_assert (NULL != rcop->op); | 946 | GNUNET_assert (NULL != rcop->op); |
947 | insert_rcop (rc, rcop); | 947 | insert_rcop (rc, rcop); |
948 | } | 948 | } |