bugfix for cvs: we were needing a rendezvous circ, so we cannibalized

a general circ, and called rend_client_rendcirc_has_opened(), which
called connection_ap_attach_pending(), which was needing a rendezvous
circ, so it cannibalized a general circuit, and called ...


svn:r3370
This commit is contained in:
Roger Dingledine 2005-01-19 17:13:11 +00:00
parent bd2d740b49
commit cfcc93296c
2 changed files with 5 additions and 6 deletions

View File

@ -49,9 +49,9 @@ static int circuit_is_acceptable(circuit_t *circ,
/* if this circ isn't our purpose, skip. */
if (purpose == CIRCUIT_PURPOSE_C_REND_JOINED && !must_be_open) {
if (circ->purpose != CIRCUIT_PURPOSE_C_ESTABLISH_REND &&
circ->purpose != CIRCUIT_PURPOSE_C_REND_READY &&
circ->purpose != CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED &&
circ->purpose != CIRCUIT_PURPOSE_C_REND_JOINED)
circ->purpose != CIRCUIT_PURPOSE_C_REND_READY &&
circ->purpose != CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED &&
circ->purpose != CIRCUIT_PURPOSE_C_REND_JOINED)
return 0;
} else if (purpose == CIRCUIT_PURPOSE_C_INTRODUCE_ACK_WAIT && !must_be_open) {
if (circ->purpose != CIRCUIT_PURPOSE_C_INTRODUCING &&
@ -555,6 +555,7 @@ void circuit_has_opened(circuit_t *circ) {
switch (circ->purpose) {
case CIRCUIT_PURPOSE_C_ESTABLISH_REND:
rend_client_rendcirc_has_opened(circ);
connection_ap_attach_pending();
break;
case CIRCUIT_PURPOSE_C_INTRODUCING:
rend_client_introcirc_has_opened(circ);

View File

@ -164,8 +164,6 @@ rend_client_rendcirc_has_opened(circuit_t *circ)
if (rend_client_send_establish_rendezvous(circ) < 0) {
return;
}
connection_ap_attach_pending();
}
/** Called when get an ACK or a NAK for a REND_INTRODUCE1 cell.
@ -400,7 +398,7 @@ void rend_client_desc_fetched(char *query, int status) {
connection_mark_for_close(conn);
}
} else { /* 404, or fetch didn't get that far */
log_fn(LOG_WARN,"Failed to fetch service id '%s', and not in cache. Closing conn.", query);
log_fn(LOG_NOTICE,"Failed to fetch service id '%s', and not in cache. Closing conn.", query);
conn->has_sent_end = 1;
connection_mark_for_close(conn);
}