diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/or/connection_edge.c | 4 | ||||
-rw-r--r-- | src/or/or.h | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index e19fa82ab7..3987cafffa 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -543,7 +543,9 @@ connection_ap_detach_retriable(edge_connection_t *conn, origin_circuit_t *circ, { control_event_stream_status(conn, STREAM_EVENT_FAILED_RETRIABLE, reason); conn->_base.timestamp_lastread = time(NULL); - if (! get_options()->LeaveStreamsUnattached) { + if (!get_options()->LeaveStreamsUnattached || conn->use_begindir) { + /* If we're attaching streams ourself, or if this connection is + * a tunneled directory connection, then just attach it. */ conn->_base.state = AP_CONN_STATE_CIRCUIT_WAIT; circuit_detach_stream(TO_CIRCUIT(circ),conn); return connection_ap_handshake_attach_circuit(conn); diff --git a/src/or/or.h b/src/or/or.h index 8af92d1dda..c7cfa21b2a 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -369,6 +369,12 @@ typedef enum { #define DIR_PURPOSE_FETCH_RENDDESC_V2 18 #define _DIR_PURPOSE_MAX 18 +#define DIR_PURPOSE_IS_UPLOAD(p) \ + ((p)==DIR_PURPOSE_UPLOAD_DIR || \ + (p)==DIR_PURPOSE_UPLOAD_RENDDESC || \ + (p)==DIR_PURPOSE_UPLOAD_VOTE || \ + (p)==DIR_PURPOSE_UPLOAD_SIGNATURES) + #define _EXIT_PURPOSE_MIN 1 /** This exit stream wants to do an ordinary connect. */ #define EXIT_PURPOSE_CONNECT 1 @@ -994,7 +1000,7 @@ typedef struct edge_connection_t { * already retried several times. */ uint8_t num_socks_retries; - /** True iff this connection is for a dns request only. */ + /** True iff this connection is for a dnsserv request only. */ unsigned int is_dns_request:1; /** True iff this stream must attach to a one-hop circuit (e.g. for |