diff options
author | Roger Dingledine <arma@torproject.org> | 2011-05-10 21:26:01 -0400 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2011-05-10 21:26:01 -0400 |
commit | 75953f9b60406815c96e9b4d324133c31ad1a084 (patch) | |
tree | 143262629d2192f6ea9a44c837234ea226eb69f7 /src/or/circuituse.c | |
parent | 1855b4ebfdd63c0c3beeeed5eefb9b0c3f50a8bd (diff) | |
parent | 8a36f2125137dc31a0771a8eeac0f2bb8c1343d0 (diff) | |
download | tor-75953f9b60406815c96e9b4d324133c31ad1a084.tar.gz tor-75953f9b60406815c96e9b4d324133c31ad1a084.zip |
Merge branch 'maint-0.2.1' into release-0.2.1
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r-- | src/or/circuituse.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c index 996c99cef1..6a9c3975c2 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -1560,14 +1560,21 @@ connection_ap_handshake_attach_circuit(edge_connection_t *conn) "introduction. (stream %d sec old)", introcirc->_base.n_circ_id, rendcirc->_base.n_circ_id, conn_age); - if (rend_client_send_introduction(introcirc, rendcirc) < 0) { + switch (rend_client_send_introduction(introcirc, rendcirc)) { + case 0: /* success */ + rendcirc->_base.timestamp_dirty = time(NULL); + introcirc->_base.timestamp_dirty = time(NULL); + assert_circuit_ok(TO_CIRCUIT(rendcirc)); + assert_circuit_ok(TO_CIRCUIT(introcirc)); + return 0; + case -1: /* transient error */ + return 0; + case -2: /* permanent error */ + return -1; + default: /* oops */ + tor_fragile_assert(); return -1; } - rendcirc->_base.timestamp_dirty = time(NULL); - introcirc->_base.timestamp_dirty = time(NULL); - assert_circuit_ok(TO_CIRCUIT(rendcirc)); - assert_circuit_ok(TO_CIRCUIT(introcirc)); - return 0; } } |