aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/gnunet-service-testbed_links.c
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2013-04-12 13:28:31 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2013-04-12 13:28:31 +0000
commitb7be9187fa9b715295faa676d8c12b93b8401374 (patch)
treeed352ce037a6c0dd93ba4038a45cf6e83974f96e /src/testbed/gnunet-service-testbed_links.c
parente60d0c42e0ccca277117de7ac7b5669abf5e336c (diff)
downloadgnunet-b7be9187fa9b715295faa676d8c12b93b8401374.tar.gz
gnunet-b7be9187fa9b715295faa676d8c12b93b8401374.zip
- remove dead code as controller linking operation does not require host
-configuration explicitly
Diffstat (limited to 'src/testbed/gnunet-service-testbed_links.c')
-rw-r--r--src/testbed/gnunet-service-testbed_links.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/testbed/gnunet-service-testbed_links.c b/src/testbed/gnunet-service-testbed_links.c
index 6ed57dd02..69cc5dddd 100644
--- a/src/testbed/gnunet-service-testbed_links.c
+++ b/src/testbed/gnunet-service-testbed_links.c
@@ -946,17 +946,15 @@ neighbour_connect_cb (void *cls, struct GNUNET_TESTBED_Controller *c)
946 */ 946 */
947void 947void
948GST_handle_link_controllers (void *cls, struct GNUNET_SERVER_Client *client, 948GST_handle_link_controllers (void *cls, struct GNUNET_SERVER_Client *client,
949 const struct GNUNET_MessageHeader *message) 949 const struct GNUNET_MessageHeader *message)
950{ 950{
951 const struct GNUNET_TESTBED_ControllerLinkRequest *msg; 951 const struct GNUNET_TESTBED_ControllerLinkRequest *msg;
952 struct GNUNET_CONFIGURATION_Handle *cfg;
953 struct LCFContextQueue *lcfq; 952 struct LCFContextQueue *lcfq;
954 struct Route *route; 953 struct Route *route;
955 struct Route *new_route; 954 struct Route *new_route;
956 uint64_t op_id; 955 uint64_t op_id;
957 uint32_t delegated_host_id; 956 uint32_t delegated_host_id;
958 uint32_t slave_host_id; 957 uint32_t slave_host_id;
959 uint16_t msize;
960 958
961 if (NULL == GST_context) 959 if (NULL == GST_context)
962 { 960 {
@@ -964,13 +962,6 @@ GST_handle_link_controllers (void *cls, struct GNUNET_SERVER_Client *client,
964 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); 962 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
965 return; 963 return;
966 } 964 }
967 msize = ntohs (message->size);
968 if (sizeof (struct GNUNET_TESTBED_ControllerLinkRequest) >= msize)
969 {
970 GNUNET_break (0);
971 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
972 return;
973 }
974 msg = (const struct GNUNET_TESTBED_ControllerLinkRequest *) message; 965 msg = (const struct GNUNET_TESTBED_ControllerLinkRequest *) message;
975 delegated_host_id = ntohl (msg->delegated_host_id); 966 delegated_host_id = ntohl (msg->delegated_host_id);
976 if (delegated_host_id == GST_context->host_id) 967 if (delegated_host_id == GST_context->host_id)
@@ -1003,15 +994,6 @@ GST_handle_link_controllers (void *cls, struct GNUNET_SERVER_Client *client,
1003 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); 994 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
1004 return; 995 return;
1005 } 996 }
1006 cfg = GNUNET_TESTBED_extract_config_ (message); /* destroy cfg here or in lcfcontext */
1007 if (NULL == cfg)
1008 {
1009 GNUNET_break (0); /* Configuration parsing error */
1010 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
1011 return;
1012 }
1013 GNUNET_CONFIGURATION_destroy (cfg);
1014 cfg = NULL;
1015 op_id = GNUNET_ntohll (msg->operation_id); 997 op_id = GNUNET_ntohll (msg->operation_id);
1016 if (slave_host_id == GST_context->host_id) /* Link from us */ 998 if (slave_host_id == GST_context->host_id) /* Link from us */
1017 { 999 {