diff options
author | George Kadianakis <desnacked@riseup.net> | 2019-04-08 16:18:44 +0300 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2019-05-03 18:15:11 +0300 |
commit | f5635989b06260710b282e75be7b731e2846f700 (patch) | |
tree | 62c67a6dfd0618a65470c1975d54a7c79217f9c5 /src/test/test_hs_service.c | |
parent | 18d61c0e6e71dace189384c8af7f4fec158969b3 (diff) | |
download | tor-f5635989b06260710b282e75be7b731e2846f700.tar.gz tor-f5635989b06260710b282e75be7b731e2846f700.zip |
Hiding crypt_path_t: Create a constructor for crypt_path_t.
We are using an opaque pointer so the structure needs to be allocated on the
heap. This means we now need a constructor for crypt_path_t.
Also modify all places initializing a crypt_path_t to use the constructor.
Diffstat (limited to 'src/test/test_hs_service.c')
-rw-r--r-- | src/test/test_hs_service.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test_hs_service.c b/src/test/test_hs_service.c index bfa66f551a..357db89040 100644 --- a/src/test/test_hs_service.c +++ b/src/test/test_hs_service.c @@ -38,6 +38,7 @@ #include "core/or/circuitbuild.h" #include "core/or/circuitlist.h" #include "core/or/circuituse.h" +#include "core/or/crypt_path.h" #include "core/or/connection_edge.h" #include "core/or/edge_connection_st.h" #include "core/or/relay.h" @@ -218,8 +219,7 @@ helper_create_origin_circuit(int purpose, int flags) circ = origin_circuit_init(purpose, flags); tor_assert(circ); - circ->cpath = tor_malloc_zero(sizeof(crypt_path_t)); - circ->cpath->magic = CRYPT_PATH_MAGIC; + circ->cpath = crypt_path_new(); circ->cpath->state = CPATH_STATE_OPEN; circ->cpath->package_window = circuit_initial_package_window(); circ->cpath->deliver_window = CIRCWINDOW_START; |