diff options
author | Mike Perry <mikeperry-git@fscked.org> | 2012-12-07 17:47:23 -0800 |
---|---|---|
committer | Mike Perry <mikeperry-git@fscked.org> | 2012-12-07 17:47:23 -0800 |
commit | 26fa47226cab49b260ba764aa050880f71927ea0 (patch) | |
tree | 5426fb2a5842c185b5864e5458171f422a67dd89 /src/or/rendservice.c | |
parent | c3b71a3fc96c6f3eaaebd96ef8c15d4298d9639e (diff) | |
download | tor-26fa47226cab49b260ba764aa050880f71927ea0.tar.gz tor-26fa47226cab49b260ba764aa050880f71927ea0.zip |
Refactor path use bias code into own function.
Also, improve and log some failure cases.
Diffstat (limited to 'src/or/rendservice.c')
-rw-r--r-- | src/or/rendservice.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c index 74e4bada92..fbf14e9349 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -1383,9 +1383,9 @@ rend_service_introduce(origin_circuit_t *circuit, const uint8_t *request, if (circuit_init_cpath_crypto(cpath,keys+DIGEST_LEN,1)<0) goto err; memcpy(cpath->handshake_digest, keys, DIGEST_LEN); - - /* For path bias: This circuit was used successfully */ - circuit->any_streams_succeeded = 1; + + /* For path bias: This intro circuit was used successfully */ + circuit->path_state = PATH_STATE_USE_SUCCEEDED; goto done; @@ -2586,7 +2586,8 @@ rend_service_rendezvous_has_opened(origin_circuit_t *circuit) tor_assert(circuit->rend_data); /* Declare the circuit dirty to avoid reuse, and for path-bias */ - circuit->base_.timestamp_dirty = time(NULL); + if(!circuit->base_.timestamp_dirty) + circuit->base_.timestamp_dirty = time(NULL); hop = circuit->build_state->service_pending_final_cpath_ref->cpath; |