commit 4f80fdbb96413952bde21c47dc88763ea669263e Author: Jorge Couchet jorge.couchet@gmail.com Date: Fri Dec 21 18:16:15 2012 -0300
Completing get_reg_for_proxy and put_reg in facilitator --- facilitator/facilitator | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/facilitator/facilitator b/facilitator/facilitator index 916271c..0fa33e9 100755 --- a/facilitator/facilitator +++ b/facilitator/facilitator @@ -322,11 +322,17 @@ def addr_af(addr_str): def get_reg_for_proxy(proxy_addr): """Get a client registration appropriate for the given proxy (one of a matching address family).""" - return REGS_IPV4.fetch() + addr_str = proxy_addr[0] + af = addr_af(addr_str) + REGS = regs_for_af(af) + return REGS.fetch()
def put_reg(reg): """Add a registration.""" - REGS_IPV4.add(reg) + addr_str = reg.host + af = addr_af(addr_str) + REGS = regs_for_af(af) + REGS.add(reg)
def main(): opts, args = getopt.gnu_getopt(sys.argv[1:], "dhl:p:r:",
tor-commits@lists.torproject.org