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

[or-cvs] r10493: When choosing a guard, weight by bandwidth. Resolves bug 440 (in tor/trunk: . src/or)



Author: nickm
Date: 2007-06-04 20:15:00 -0400 (Mon, 04 Jun 2007)
New Revision: 10493

Modified:
   tor/trunk/
   tor/trunk/src/or/routerlist.c
Log:
 r13254@catbus:  nickm | 2007-06-04 20:13:47 -0400
 When choosing a guard, weight by bandwidth.  Resolves bug 440.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r13254] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c	2007-06-04 22:57:23 UTC (rev 10492)
+++ tor/trunk/src/or/routerlist.c	2007-06-05 00:15:00 UTC (rev 10493)
@@ -1365,7 +1365,7 @@
     if (excludedsmartlist)
       smartlist_subtract(sl,excludedsmartlist);
 
-    if (need_capacity)
+    if (need_capacity || need_guard)
       choice = routerlist_sl_choose_by_bandwidth(sl, weight_for_exit);
     else
       choice = smartlist_choose(sl);