diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2011-04-28 19:00:34 +0200 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2011-04-28 19:00:34 +0200 |
commit | 4b13ebd5ab4d051803e9cfde8bb965a4bf8ea90d (patch) | |
tree | c0f219599f0968d40ec486efacd4e91ee637bb01 /src/or/circuituse.c | |
parent | 0130e7c9d2842ad58e1b84829aeab16a2efba3bb (diff) | |
parent | 8a36f2125137dc31a0771a8eeac0f2bb8c1343d0 (diff) | |
download | tor-4b13ebd5ab4d051803e9cfde8bb965a4bf8ea90d.tar.gz tor-4b13ebd5ab4d051803e9cfde8bb965a4bf8ea90d.zip |
Merge branch 'bug3k_021' into bug3k_022
Conflicts:
src/or/or.h
src/or/rendclient.c
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 8503dae46c..fbe2e459a5 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -1744,14 +1744,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; } } |