[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/maint-0.2.1] Mark which OR connections are outgoing
commit c05bb53508f5fe3e570a285e6c9ead452ded0e43
Author: Robert Ransom <rransom.8774@xxxxxxxxx>
Date: Sun Oct 23 14:58:00 2011 -0700
Mark which OR connections are outgoing
---
src/or/connection_or.c | 2 ++
src/or/or.h | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 35f6da9..f019c79 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -776,6 +776,8 @@ connection_or_connect(const tor_addr_t *_addr, uint16_t port,
conn->_base.state = OR_CONN_STATE_CONNECTING;
control_event_or_conn_status(conn, OR_CONN_EVENT_LAUNCHED, 0);
+ conn->is_outgoing = 1;
+
if (options->HttpsProxy) {
/* we shouldn't connect directly. use the https proxy instead. */
tor_addr_from_ipv4h(&addr, options->HttpsProxyAddr);
diff --git a/src/or/or.h b/src/or/or.h
index 72e4c63..edbb73c 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -1035,6 +1035,8 @@ typedef struct or_connection_t {
* is a client. Connections with this flag set should never be used
* to satisfy an EXTEND request. */
unsigned int is_connection_with_client:1;
+ /** True iff this is an outgoing connection. */
+ unsigned int is_outgoing:1;
uint8_t link_proto; /**< What protocol version are we using? 0 for
* "none negotiated yet." */
circid_t next_circ_id; /**< Which circ_id do we try to use next on
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits