[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] choose exit nodes by bandwidth too
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
circuitbuild.c or.h routerlist.c
Log Message:
choose exit nodes by bandwidth too
Index: circuitbuild.c
===================================================================
RCS file: /home/or/cvsroot/src/or/circuitbuild.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- circuitbuild.c 17 Aug 2004 12:09:37 -0000 1.26
+++ circuitbuild.c 18 Aug 2004 06:10:12 -0000 1.27
@@ -909,7 +909,7 @@
smartlist_subtract(sl,excludedexits);
if (options.StrictExitNodes || smartlist_overlap(sl,preferredexits))
smartlist_intersect(sl,preferredexits);
- router = smartlist_choose(sl);
+ router = routerlist_sl_choose_by_bandwidth(sl);
} else {
/* Either there are no pending connections, or no routers even seem to
* possibly support any of them. Choose a router at random. */
@@ -923,7 +923,7 @@
smartlist_subtract(sl,excludedexits);
if (options.StrictExitNodes || smartlist_overlap(sl,preferredexits))
smartlist_intersect(sl,preferredexits);
- router = smartlist_choose(sl);
+ router = routerlist_sl_choose_by_bandwidth(sl);
}
smartlist_free(preferredexits);
Index: or.h
===================================================================
RCS file: /home/or/cvsroot/src/or/or.h,v
retrieving revision 1.410
retrieving revision 1.411
diff -u -d -r1.410 -r1.411
--- or.h 18 Aug 2004 04:44:24 -0000 1.410
+++ or.h 18 Aug 2004 06:10:12 -0000 1.411
@@ -1396,6 +1396,7 @@
struct smartlist_t;
void add_nickname_list_to_smartlist(struct smartlist_t *sl, const char *list);
int router_nickname_matches(routerinfo_t *router, const char *nickname);
+routerinfo_t *routerlist_sl_choose_by_bandwidth(smartlist_t *sl);
routerinfo_t *router_choose_random_node(char *preferred, char *excluded,
struct smartlist_t *excludedsmartlist,
int preferuptime, int preferbandwidth,
Index: routerlist.c
===================================================================
RCS file: /home/or/cvsroot/src/or/routerlist.c,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -d -r1.126 -r1.127
--- routerlist.c 17 Aug 2004 08:00:23 -0000 1.126
+++ routerlist.c 18 Aug 2004 06:10:12 -0000 1.127
@@ -236,7 +236,7 @@
}
}
-static routerinfo_t *
+routerinfo_t *
routerlist_sl_choose_by_bandwidth(smartlist_t *sl)
{
int i;