diff options
author | Roger Dingledine <arma@torproject.org> | 2007-10-14 07:51:39 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2007-10-14 07:51:39 +0000 |
commit | 8bf32223d714b67e176bf79eea4cd3fb2e578d55 (patch) | |
tree | d80d6d3da357dedde9cea04ff61d1ae362e3807a /src | |
parent | 8b35202b474fb11f2c92773d78bf432e95eaea05 (diff) | |
download | tor-8bf32223d714b67e176bf79eea4cd3fb2e578d55.tar.gz tor-8bf32223d714b67e176bf79eea4cd3fb2e578d55.zip |
backport r11499, r11500, r11501: hidserv hexdigests rather than nicknames
svn:r11922
Diffstat (limited to 'src')
-rw-r--r-- | src/or/rendcommon.c | 2 | ||||
-rw-r--r-- | src/or/rendservice.c | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c index 287d089459..a90f6a6116 100644 --- a/src/or/rendcommon.c +++ b/src/or/rendcommon.c @@ -146,7 +146,7 @@ rend_parse_service_descriptor(const char *str, size_t len) result->protocols = ntohs(get_uint16(cp)); cp += 2; } else { - result->protocols = 1; + result->protocols = 1<<2; /* always use intro format 2 */ } if (end-cp < 2) goto truncated; result->n_intro_points = ntohs(get_uint16(cp)); diff --git a/src/or/rendservice.c b/src/or/rendservice.c index 3b509a0e4b..0e05dc23f7 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -303,16 +303,17 @@ rend_service_update_descriptor(rend_service_t *service) d->intro_point_extend_info = tor_malloc_zero(sizeof(extend_info_t*)*n); d->protocols = (1<<2) | (1<<0); /* We support protocol 2 and protocol 0. */ for (i=0; i < n; ++i) { - router = router_get_by_nickname(smartlist_get(service->intro_nodes, i),1); + const char *name = smartlist_get(service->intro_nodes, i); + router = router_get_by_nickname(name, 1); if (!router) { log_info(LD_REND,"Router '%s' not found for intro point %d. Skipping.", - safe_str((char*)smartlist_get(service->intro_nodes, i)), i); + safe_str(name), i); continue; } circ = find_intro_circuit(router, service->pk_digest); if (circ && circ->_base.purpose == CIRCUIT_PURPOSE_S_INTRO) { /* We have an entirely established intro circuit. */ - d->intro_points[d->n_intro_points] = tor_strdup(router->nickname); + d->intro_points[d->n_intro_points] = tor_strdup(name); d->intro_point_extend_info[d->n_intro_points] = extend_info_from_router(router); d->n_intro_points++; |