commit 2c02a4b96a7ff7aefacb32dcf8531a5ab17b6aa2 Author: David Fifield david@bamsoftware.com Date: Thu Oct 17 00:23:50 2013 -0700
Don't pun different data types behind the same variable name.
You parse a string such as "obfs3|websocket" to get a Transport. --- facilitator/facilitator | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/facilitator/facilitator b/facilitator/facilitator index 8988d9e..0cd287a 100755 --- a/facilitator/facilitator +++ b/facilitator/facilitator @@ -320,11 +320,11 @@ class Handler(SocketServer.StreamRequestHandler): # Example: PUT CLIENT="1.1.1.1:5555" TRANSPORT="obfs3|websocket" def do_PUT(self, params): # Check out if we recognize the transport in this registration request - transport = fac.param_first("TRANSPORT", params) - if transport is None: + transport_spec = fac.param_first("TRANSPORT", params) + if transport_spec is None: return self.error(u"PUT missing TRANSPORT param")
- transport = Transport.parse(transport) + transport = Transport.parse(transport_spec) # See if we have relays that support this transport if transport.outer not in options.outer_transports: return self.error(u"Unrecognized transport: %s" % transport.outer)
tor-commits@lists.torproject.org