aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/gnunet-service-testbed.c
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2013-02-20 15:15:35 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2013-02-20 15:15:35 +0000
commita807aa20caec761b314a5eddcffbdd36650bd7d9 (patch)
treee68bc0be91a5db17740d71fa74ea132c7f3d13bc /src/testbed/gnunet-service-testbed.c
parentadf18305521dc87c4ca1aee82e910ff8e22199cc (diff)
downloadgnunet-a807aa20caec761b314a5eddcffbdd36650bd7d9.tar.gz
gnunet-a807aa20caec761b314a5eddcffbdd36650bd7d9.zip
Assosiate a configuration template while creating hosts. This paves a way to
manage the configurations of controllers running on a host automatically. modified ADD_HOST message structure to have host configuration. This feature is yet to be implemented. The idea is that GNUNET_TESTBED_link_controllers() should take no configuration when hosts automatically update configuration when a new configuration is generated from a template.
Diffstat (limited to 'src/testbed/gnunet-service-testbed.c')
-rw-r--r--src/testbed/gnunet-service-testbed.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/testbed/gnunet-service-testbed.c b/src/testbed/gnunet-service-testbed.c
index cb8c4a5f5..059423e96 100644
--- a/src/testbed/gnunet-service-testbed.c
+++ b/src/testbed/gnunet-service-testbed.c
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 (C) 2012 Christian Grothoff (and other contributing authors) 3 (C) 2008--2013 Christian Grothoff (and other contributing authors)
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published 6 it under the terms of the GNU General Public License as published
@@ -945,7 +945,8 @@ handle_init (void *cls, struct GNUNET_SERVER_Client *client,
945 hostname); 945 hostname);
946 host = 946 host =
947 GNUNET_TESTBED_host_create_with_id (GST_context->host_id, 947 GNUNET_TESTBED_host_create_with_id (GST_context->host_id,
948 GST_context->master_ip, NULL, 0); 948 GST_context->master_ip, NULL,
949 our_config, 0);
949 host_list_add (host); 950 host_list_add (host);
950 LOG_DEBUG ("Created master context with host ID: %u\n", GST_context->host_id); 951 LOG_DEBUG ("Created master context with host ID: %u\n", GST_context->host_id);
951 GNUNET_SERVER_receive_done (client, GNUNET_OK); 952 GNUNET_SERVER_receive_done (client, GNUNET_OK);
@@ -1004,9 +1005,10 @@ handle_add_host (void *cls, struct GNUNET_SERVER_Client *client,
1004 username = NULL; 1005 username = NULL;
1005 } 1006 }
1006 LOG_DEBUG ("-------ssh port: %u\n", ntohs (msg->ssh_port)); 1007 LOG_DEBUG ("-------ssh port: %u\n", ntohs (msg->ssh_port));
1008 /* FIXME: should use configuration from ADDHOST message */
1007 host = 1009 host =
1008 GNUNET_TESTBED_host_create_with_id (host_id, hostname, username, 1010 GNUNET_TESTBED_host_create_with_id (host_id, hostname, username,
1009 ntohs (msg->ssh_port)); 1011 our_config, ntohs (msg->ssh_port));
1010 GNUNET_assert (NULL != host); 1012 GNUNET_assert (NULL != host);
1011 reply_size = sizeof (struct GNUNET_TESTBED_HostConfirmedMessage); 1013 reply_size = sizeof (struct GNUNET_TESTBED_HostConfirmedMessage);
1012 if (GNUNET_OK != host_list_add (host)) 1014 if (GNUNET_OK != host_list_add (host))