[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [bridgedb/master] 4297 - Prepopulate rings before calling dumpAssignments



commit 8d3aa5cb83ee0eff0f8453c5a0c56ba06f574204
Author: aagbsn <aagbsn@xxxxxxxx>
Date:   Sun Sep 9 17:30:26 2012 -0700

    4297 - Prepopulate rings before calling dumpAssignments
    
    Default rings are not populated if the FilteredBridgeSplitter is
    cleared on reload().
---
 lib/bridgedb/Main.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/bridgedb/Main.py b/lib/bridgedb/Main.py
index 4faec57..31c9917 100644
--- a/lib/bridgedb/Main.py
+++ b/lib/bridgedb/Main.py
@@ -309,7 +309,6 @@ def startup(cfg):
             Bridges.get_hmac(key, "HTTPS-IP-Dist-Key"),
             categories,
             answerParameters=ringParams)
-        ipDistributor.prepopulateRings() # create default rings
         splitter.addRing(ipDistributor, "https", cfg.HTTPS_SHARE)
         #webSchedule = Time.IntervalSchedule("day", 2)
         webSchedule = Time.NoSchedule()
@@ -323,7 +322,6 @@ def startup(cfg):
             cfg.EMAIL_DOMAIN_MAP.copy(),
             cfg.EMAIL_DOMAIN_RULES.copy(),
             answerParameters=ringParams)
-        emailDistributor.prepopulateRings() # create default rings
         splitter.addRing(emailDistributor, "email", cfg.EMAIL_SHARE)
         #emailSchedule = Time.IntervalSchedule("day", 1)
         emailSchedule = Time.NoSchedule()
@@ -357,8 +355,10 @@ def startup(cfg):
         proxyList.replaceProxyList(loadProxyList(cfg))
         logging.info("%d bridges loaded", len(splitter))
         if emailDistributor:
+            emailDistributor.prepopulateRings() # create default rings
             logging.info("%d for email", len(emailDistributor.splitter))
         if ipDistributor:
+            ipDistributor.prepopulateRings() # create default rings
             logging.info("%d for web:", len(ipDistributor.splitter))
             for (n,(f,r)) in ipDistributor.splitter.filterRings.items():
                     logging.info(" by filter set %s, %d" % (n, len(r)))

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits