summaryrefslogtreecommitdiff
path: root/src/or/rendservice.c
diff options
context:
space:
mode:
authorteor <teor2345@gmail.com>2015-01-10 17:20:06 +1100
committerteor <teor2345@gmail.com>2015-01-10 17:20:06 +1100
commitf8ffb57bc4430ff9bbd7560eecdda4284b2799ba (patch)
tree7b73b0bf39d756c31bb62dbcd3c239864a6a46c8 /src/or/rendservice.c
parentdebd7862bb6d641c13fe4ee019da633c683d740e (diff)
parent33df3e37ffecfed309a1a0f210a96620c0ebb837 (diff)
downloadtor-f8ffb57bc4430ff9bbd7560eecdda4284b2799ba.tar.gz
tor-f8ffb57bc4430ff9bbd7560eecdda4284b2799ba.zip
Merge branch 'master' of https://git.torproject.org/tor into bug13111-empty-key-files-fn-empty
Conflicts: src/or/connection_edge.c Merged in favour of origin.
Diffstat (limited to 'src/or/rendservice.c')
-rw-r--r--src/or/rendservice.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 196145e210..3b73674691 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -1,5 +1,5 @@
/* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
- * Copyright (c) 2007-2014, The Tor Project, Inc. */
+ * Copyright (c) 2007-2015, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
@@ -531,7 +531,7 @@ rend_config_services(const or_options_t *options, int validate_only)
}
}
if (service) {
- cpd_check_t check_opts = CPD_CHECK_MODE_ONLY;
+ cpd_check_t check_opts = CPD_CHECK_MODE_ONLY|CPD_CHECK;
if (service->dir_group_readable) {
check_opts |= CPD_GROUP_READ;
}
@@ -1527,8 +1527,7 @@ find_rp_for_intro(const rend_intro_cell_t *intro,
}
if (intro->version == 0 || intro->version == 1) {
- if (intro->version == 1) rp_nickname = (const char *)(intro->u.v1.rp);
- else rp_nickname = (const char *)(intro->u.v0.rp);
+ rp_nickname = (const char *)(intro->u.v0_v1.rp);
node = node_get_by_nickname(rp_nickname, 0);
if (!node) {
@@ -1777,11 +1776,7 @@ rend_service_parse_intro_for_v0_or_v1(
goto err;
}
- if (intro->version == 1) {
- memcpy(intro->u.v1.rp, rp_nickname, endptr - rp_nickname + 1);
- } else {
- memcpy(intro->u.v0.rp, rp_nickname, endptr - rp_nickname + 1);
- }
+ memcpy(intro->u.v0_v1.rp, rp_nickname, endptr - rp_nickname + 1);
return ver_specific_len;