Set rend_query on exiting streams

svn:r1551
This commit is contained in:
Nick Mathewson
2004-04-08 02:10:43 +00:00
parent 190e59772a
commit 46c82e7dbe
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -1136,7 +1136,7 @@ static int connection_exit_begin_conn(cell_t *cell, circuit_t *circ) {
if(circ->purpose == CIRCUIT_PURPOSE_S_REND_JOINED) {
n_stream->address = tor_strdup("(rendezvous)");
strcpy(n_stream->rend_query, "yes"); /* XXX kludge */
strcpy(n_stream->rend_query, circ->rend_query);
if(rend_service_set_connection_addr_port(n_stream, circ) < 0) {
log_fn(LOG_WARN,"Didn't find rendezvous service (port %d)",n_stream->port);
connection_mark_for_close(n_stream,0 /* XXX */);
+2
View File
@@ -425,6 +425,7 @@ rend_service_introduce(circuit_t *circuit, const char *request, int request_len)
memcpy(launched->rend_pk_digest, circuit->rend_pk_digest,
DIGEST_LEN);
memcpy(launched->rend_cookie, r_cookie, REND_COOKIE_LEN);
strcpy(launched->rend_query, service->service_id);
launched->build_state->pending_final_cpath = cpath =
tor_malloc_zero(sizeof(crypt_path_t));
@@ -461,6 +462,7 @@ rend_service_launch_establish_intro(rend_service_t *service, char *nickname)
nickname);
return -1;
}
strcpy(launched->rend_query, service->service_id);
memcpy(launched->rend_pk_digest, service->pk_digest, DIGEST_LEN);
return 0;