diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-15 10:37:33 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-15 10:37:33 -0400 |
commit | 6c0fe9d07c40ce453b5c9c7a60cbfd13bf3ca6d7 (patch) | |
tree | 31d5b8440b128ec1ec4d231e219fea1e2eb7c596 /src/or/connection.c | |
parent | 1416f54d1eb2651e6b82ccbe35585ce71378de8a (diff) | |
download | tor-6c0fe9d07c40ce453b5c9c7a60cbfd13bf3ca6d7.tar.gz tor-6c0fe9d07c40ce453b5c9c7a60cbfd13bf3ca6d7.zip |
Split listener_connection_t into its own header
For once, it's a type that is used almost nowhere else besides the
logical place.
Diffstat (limited to 'src/or/connection.c')
-rw-r--r-- | src/or/connection.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index 8c7341992d..11da4fc97f 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -116,6 +116,7 @@ #include "dir_connection_st.h" #include "control_connection_st.h" #include "entry_connection_st.h" +#include "listener_connection_st.h" #include "port_cfg_st.h" static connection_t *connection_listener_new( @@ -172,6 +173,15 @@ static smartlist_t *outgoing_addrs = NULL; /**************************************************************/ +/** Convert a connection_t* to an listener_connection_t*; assert if the cast + * is invalid. */ +listener_connection_t * +TO_LISTENER_CONN(connection_t *c) +{ + tor_assert(c->magic == LISTENER_CONNECTION_MAGIC); + return DOWNCAST(listener_connection_t, c); +} + /** * Return the human-readable name for the connection type <b>type</b> */ |