aboutsummaryrefslogtreecommitdiff
path: root/src/or/rendcommon.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-05-14 10:46:45 -0400
committerNick Mathewson <nickm@torproject.org>2015-05-14 10:46:45 -0400
commitd05d21c89a21695ba9de32140ff13c68610b39f0 (patch)
tree3c73779f9cdef3b3d57045c6308be01858d64405 /src/or/rendcommon.c
parent6346d73b8efd030436f69b905c0956e24dcb036f (diff)
parentacfa374048cfbf7f632ecaba8355826366e4ed1f (diff)
downloadtor-d05d21c89a21695ba9de32140ff13c68610b39f0.tar.gz
tor-d05d21c89a21695ba9de32140ff13c68610b39f0.zip
Merge branch 'bug15880_027_03'
Diffstat (limited to 'src/or/rendcommon.c')
-rw-r--r--src/or/rendcommon.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c
index c3f0d32ac6..f06a5ff424 100644
--- a/src/or/rendcommon.c
+++ b/src/or/rendcommon.c
@@ -1400,8 +1400,14 @@ rend_process_relay_cell(circuit_t *circ, const crypt_path_t *layer_hint,
rend_data_t *
rend_data_dup(const rend_data_t *data)
{
+ rend_data_t *data_dup;
tor_assert(data);
- return tor_memdup(data, sizeof(rend_data_t));
+ data_dup = tor_memdup(data, sizeof(rend_data_t));
+ data_dup->hsdirs_fp = smartlist_new();
+ SMARTLIST_FOREACH(data->hsdirs_fp, char *, fp,
+ smartlist_add(data_dup->hsdirs_fp,
+ tor_memdup(fp, DIGEST_LEN)));
+ return data_dup;
}
/** Compute descriptor ID for each replicas and save them. A valid onion
@@ -1495,6 +1501,7 @@ rend_data_client_create(const char *onion_address, const char *desc_id,
}
rend_data->auth_type = auth_type;
+ rend_data->hsdirs_fp = smartlist_new();
return rend_data;