diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-10-29 01:29:59 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-10-29 01:29:59 -0400 |
commit | 4b6f074df9c540cb4847793b7e8243c8f642de0a (patch) | |
tree | 3e203c80bc1e1de0a226e9d30b076ecdb8c91d0b /src/or/entrynodes.c | |
parent | 49278cd68a0d84727ae1131e677bc3481b3e2fc7 (diff) | |
parent | 2235d65240ed1624d49a79891bc5ae564a6a4f34 (diff) | |
download | tor-4b6f074df9c540cb4847793b7e8243c8f642de0a.tar.gz tor-4b6f074df9c540cb4847793b7e8243c8f642de0a.zip |
Merge remote-tracking branch 'public/bug5018'
Conflicts:
src/or/entrynodes.c
Diffstat (limited to 'src/or/entrynodes.c')
-rw-r--r-- | src/or/entrynodes.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c index 59cc9a3fc3..ecc67f007b 100644 --- a/src/or/entrynodes.c +++ b/src/or/entrynodes.c @@ -1801,6 +1801,23 @@ bridge_resolve_conflicts(const tor_addr_t *addr, uint16_t port, } SMARTLIST_FOREACH_END(bridge); } +/** Return True if we have a bridge that uses a transport with name + * <b>transport_name</b>. */ +int +transport_is_needed(const char *transport_name) +{ + if (!bridge_list) + return 0; + + SMARTLIST_FOREACH_BEGIN(bridge_list, const bridge_info_t *, bridge) { + if (bridge->transport_name && + !strcmp(bridge->transport_name, transport_name)) + return 1; + } SMARTLIST_FOREACH_END(bridge); + + return 0; +} + /** Register the bridge information in <b>bridge_line</b> to the * bridge subsystem. Steals reference of <b>bridge_line</b>. */ void |