summaryrefslogtreecommitdiff
path: root/src/or/connection_or.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-06-07 07:11:42 +0000
committerRoger Dingledine <arma@torproject.org>2006-06-07 07:11:42 +0000
commit1e9b35aee33b9b5cb31debd76d7feec378b3d039 (patch)
treedbc5e55016be31ebee02796a1520dfd6e3e871b6 /src/or/connection_or.c
parent003561fa64615ce9d68d5f3c9f7a6d95768b4158 (diff)
downloadtor-1e9b35aee33b9b5cb31debd76d7feec378b3d039.tar.gz
tor-1e9b35aee33b9b5cb31debd76d7feec378b3d039.zip
make connection_or_nonopen_was_started_here() based on something less
voodooey. it turns out we already do keep a flag like that around. svn:r6560
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r--src/or/connection_or.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 9c614b5c83..4dc4a53e92 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -543,11 +543,9 @@ int
connection_or_nonopen_was_started_here(connection_t *conn)
{
tor_assert(conn->type == CONN_TYPE_OR);
-
- if (tor_digest_is_zero(conn->identity_digest))
- return 0;
- else
- return 1;
+ if (!conn->tls)
+ return 1; /* it's still in proxy states or something */
+ return !tor_tls_is_server(conn->tls);
}
/** Conn just completed its handshake. Return 0 if all is well, and