aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_hs.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@ev0ke.net>2015-04-30 12:28:11 -0400
committerNick Mathewson <nickm@torproject.org>2015-05-14 10:46:38 -0400
commitc1ffeadff4db375886d40bb5928ddd4fe761ba9f (patch)
treea1911a7d1b60a6908f506f96604f51c90fb8c57b /src/test/test_hs.c
parent95a9920461dd3322280a13c8d99e363c91028ab2 (diff)
downloadtor-c1ffeadff4db375886d40bb5928ddd4fe761ba9f.tar.gz
tor-c1ffeadff4db375886d40bb5928ddd4fe761ba9f.zip
Add missing descriptor ID to HS_DESC control event
For FAILED and RECEIVED action of the HS_DESC event, we now sends back the descriptor ID at the end like specified in the control-spec section 4.1.25. Fixes #15881 Signed-off-by: David Goulet <dgoulet@ev0ke.net>
Diffstat (limited to 'src/test/test_hs.c')
-rw-r--r--src/test/test_hs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/test_hs.c b/src/test/test_hs.c
index 4c43ebd604..89438f216e 100644
--- a/src/test/test_hs.c
+++ b/src/test/test_hs.c
@@ -160,7 +160,7 @@ test_hs_desc_event(void *arg)
/* test received event */
rend_query.auth_type = 1;
control_event_hs_descriptor_received(rend_query.onion_address,
- rend_query.auth_type, HSDIR_EXIST_ID);
+ &rend_query, HSDIR_EXIST_ID);
expected_msg = "650 HS_DESC RECEIVED "STR_HS_ADDR" BASIC_AUTH "\
STR_HSDIR_EXIST_LONGNAME"\r\n";
tt_assert(received_msg);
@@ -169,8 +169,8 @@ test_hs_desc_event(void *arg)
/* test failed event */
rend_query.auth_type = 2;
- control_event_hs_descriptor_failed(rend_query.onion_address,
- rend_query.auth_type, HSDIR_NONE_EXIST_ID,
+ control_event_hs_descriptor_failed(&rend_query,
+ HSDIR_NONE_EXIST_ID,
"QUERY_REJECTED");
expected_msg = "650 HS_DESC FAILED "STR_HS_ADDR" STEALTH_AUTH "\
STR_HSDIR_NONE_EXIST_LONGNAME" REASON=QUERY_REJECTED\r\n";
@@ -180,8 +180,8 @@ test_hs_desc_event(void *arg)
/* test invalid auth type */
rend_query.auth_type = 999;
- control_event_hs_descriptor_failed(rend_query.onion_address,
- rend_query.auth_type, HSDIR_EXIST_ID,
+ control_event_hs_descriptor_failed(&rend_query,
+ HSDIR_EXIST_ID,
"QUERY_REJECTED");
expected_msg = "650 HS_DESC FAILED "STR_HS_ADDR" UNKNOWN "\
STR_HSDIR_EXIST_LONGNAME" REASON=QUERY_REJECTED\r\n";