diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-10-12 14:58:31 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-10-12 14:58:31 +0000 |
commit | f2cfcd5b55fb441a5cd76c4508be48c85d2b93b1 (patch) | |
tree | 47b685bf218dc7838beaabafffabd85a194b616a /src/testbed/testbed_api.c | |
parent | a880ba0d8eaa854c5bbff9f51e467a18c3ca6201 (diff) | |
download | gnunet-f2cfcd5b55fb441a5cd76c4508be48c85d2b93b1.tar.gz gnunet-f2cfcd5b55fb441a5cd76c4508be48c85d2b93b1.zip |
fixes
Diffstat (limited to 'src/testbed/testbed_api.c')
-rw-r--r-- | src/testbed/testbed_api.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/testbed/testbed_api.c b/src/testbed/testbed_api.c index 7cd536497..053d730ff 100644 --- a/src/testbed/testbed_api.c +++ b/src/testbed/testbed_api.c | |||
@@ -1780,9 +1780,13 @@ GNUNET_TESTBED_register_host (struct GNUNET_TESTBED_Controller *controller, | |||
1780 | msg->header.type = htons (GNUNET_MESSAGE_TYPE_TESTBED_ADDHOST); | 1780 | msg->header.type = htons (GNUNET_MESSAGE_TYPE_TESTBED_ADDHOST); |
1781 | msg->host_id = htonl (GNUNET_TESTBED_host_get_id_ (host)); | 1781 | msg->host_id = htonl (GNUNET_TESTBED_host_get_id_ (host)); |
1782 | msg->ssh_port = htons (GNUNET_TESTBED_host_get_ssh_port_ (host)); | 1782 | msg->ssh_port = htons (GNUNET_TESTBED_host_get_ssh_port_ (host)); |
1783 | msg->user_name_length = htons (user_name_length); | ||
1784 | if (NULL != username) | 1783 | if (NULL != username) |
1784 | { | ||
1785 | msg->user_name_length = htons (user_name_length - 1); | ||
1785 | memcpy (&msg[1], username, user_name_length); | 1786 | memcpy (&msg[1], username, user_name_length); |
1787 | } | ||
1788 | else | ||
1789 | msg->user_name_length = htons (user_name_length); | ||
1786 | strcpy (((void *) &msg[1]) + user_name_length, hostname); | 1790 | strcpy (((void *) &msg[1]) + user_name_length, hostname); |
1787 | GNUNET_TESTBED_queue_message_ (controller, | 1791 | GNUNET_TESTBED_queue_message_ (controller, |
1788 | (struct GNUNET_MessageHeader *) msg); | 1792 | (struct GNUNET_MessageHeader *) msg); |