summaryrefslogtreecommitdiff
path: root/auto_tests
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-01-03 22:13:20 -0500
committerirungentoo <irungentoo@gmail.com>2014-01-03 22:13:20 -0500
commitd46891c3b7cf70a2b436562ae387d85384f05d5c (patch)
tree20039221262790fd49c3632c390ee9af9ecf8875 /auto_tests
parent97a141c0cc3cb2775e60cd61340bf1f63bf9d2b6 (diff)
A bit of work done on the onion part.
Diffstat (limited to 'auto_tests')
-rw-r--r--auto_tests/onion_test.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/auto_tests/onion_test.c b/auto_tests/onion_test.c
index a5175566..745ca4ac 100644
--- a/auto_tests/onion_test.c
+++ b/auto_tests/onion_test.c
@@ -26,13 +26,8 @@ static int handle_test_1(void *object, IP_Port source, uint8_t *packet, uint32_t
26 if (memcmp(packet, "Install Gentoo", sizeof("Install Gentoo")) != 0) 26 if (memcmp(packet, "Install Gentoo", sizeof("Install Gentoo")) != 0)
27 return 1; 27 return 1;
28 28
29 uint8_t data[1024]; 29 if (send_onion_response(onion->net, source, "install gentoo", sizeof("install gentoo"),
30 data[0] = NET_PACKET_ONION_RECV_3; 30 packet + sizeof("Install Gentoo")) == -1)
31 memcpy(data + 1, packet + sizeof("Install Gentoo"), length - sizeof("Install Gentoo"));
32 memcpy(data + 1 + length - sizeof("Install Gentoo"), "install gentoo", sizeof("install gentoo"));
33 uint32_t data_len = 1 + length;
34
35 if ((uint32_t)sendpacket(onion->net, source, data, data_len) != data_len)
36 return 1; 31 return 1;
37 32
38 handled_test_1 = 1; 33 handled_test_1 = 1;