substantive changes on nick's rendezvous commit.

nick, can you fix these?


svn:r4554
This commit is contained in:
Roger Dingledine
2005-07-14 08:45:19 +00:00
parent 2259032ea1
commit 4a6bf116e7
+4 -1
View File
@@ -483,7 +483,7 @@ rend_service_introduce(circuit_t *circuit, const char *request, size_t request_l
rp_nickname = buf;
version = 0;
}
/* XXX when 0.1.0.x is obsolete, change this to reject version != 2. */
/* XXX when 0.1.0.x is obsolete, change this to reject version < 2. */
ptr=memchr(rp_nickname,0,nickname_field_len);
if (!ptr || ptr == rp_nickname) {
log_fn(LOG_WARN, "Couldn't find a null-padded nickname in INTRODUCE2 cell");
@@ -593,6 +593,7 @@ rend_service_relaunch_rendezvous(circuit_t *oldcirc)
oldcirc->build_state->expiry_time < time(NULL)) {
log_fn(LOG_INFO,"Attempt to build circuit to %s for rendezvous has failed too many times or expired; giving up.",
oldcirc->build_state->chosen_exit->nickname);
/* XXX bug: if the first clause of the if triggers, we'll seg fault. */
return;
}
@@ -830,6 +831,7 @@ find_intro_circuit(routerinfo_t *router, const char *pk_digest)
while ((circ = circuit_get_next_by_pk_and_purpose(circ,pk_digest,
CIRCUIT_PURPOSE_S_INTRO))) {
tor_assert(circ->cpath);
/* XXX this is a bug. ->nickname will always be there. */
if (circ->build_state->chosen_exit->nickname &&
!strcasecmp(circ->build_state->chosen_exit->nickname, router->nickname)) {
return circ;
@@ -840,6 +842,7 @@ find_intro_circuit(routerinfo_t *router, const char *pk_digest)
while ((circ = circuit_get_next_by_pk_and_purpose(circ,pk_digest,
CIRCUIT_PURPOSE_S_ESTABLISH_INTRO))) {
tor_assert(circ->cpath);
/* XXX this is a bug. ->nickname will always be there. */
if (circ->build_state->chosen_exit->nickname &&
!strcasecmp(circ->build_state->chosen_exit->nickname, router->nickname)) {
return circ;