瀏覽代碼

Set rend_query on exiting streams

svn:r1551
Nick Mathewson 20 年之前
父節點
當前提交
46c82e7dbe
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 1 1
      src/or/connection_edge.c
  2. 2 0
      src/or/rendservice.c

+ 1 - 1
src/or/connection_edge.c

@@ -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 - 0
src/or/rendservice.c

@@ -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;