aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2012-05-18 03:07:46 +0300
committerGeorge Kadianakis <desnacked@riseup.net>2012-05-18 03:07:46 +0300
commit5dc9acb5e5d630372da991cb4c9569c593355273 (patch)
treec2e0e9047ce2322cbc6a286e6e30a3dcb0881405 /src/or/circuitbuild.c
parentf00a8b430709aff3045fe20e3f776858e0ec79ae (diff)
downloadtor-5dc9acb5e5d630372da991cb4c9569c593355273.tar.gz
tor-5dc9acb5e5d630372da991cb4c9569c593355273.zip
Use a more helpful log message when we can't find a proxy.
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r--src/or/circuitbuild.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 403f65f284..82ff327135 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -4972,6 +4972,21 @@ find_bridge_by_digest(const char *digest)
return NULL;
}
+const char *
+find_transport_name_by_bridge_addrport(const tor_addr_t *addr, uint16_t port)
+{
+ if (!bridge_list)
+ return NULL;
+
+ SMARTLIST_FOREACH_BEGIN(bridge_list, const bridge_info_t *, bridge) {
+ if (tor_addr_eq(&bridge->addr, addr) &&
+ (bridge->port == port))
+ return bridge->transport_name;
+ } SMARTLIST_FOREACH_END(bridge);
+
+ return NULL;
+}
+
/** If <b>addr</b> and <b>port</b> match the address and port of a
* bridge of ours that uses pluggable transports, place its transport
* in <b>transport</b>.