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

[or-cvs] comment that scary-looking function.



Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or

Modified Files:
	routerlist.c 
Log Message:
comment that scary-looking function.


Index: routerlist.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/routerlist.c,v
retrieving revision 1.380
retrieving revision 1.381
diff -u -d -r1.380 -r1.381
--- routerlist.c	23 Nov 2005 07:28:54 -0000	1.380
+++ routerlist.c	23 Nov 2005 07:30:44 -0000	1.381
@@ -1152,6 +1152,14 @@
       smartlist_len(routerlist->old_routers), U64_PRINTF_ARG(olddescs));
 }
 
+/** Return non-zero if we have a lot of extra descriptors in our
+ * routerlist, and should get rid of some of them. Else return 0.
+ *
+ * We should be careful to not return true too eagerly, since we
+ * could churn. By using "+1" below, we make sure this function
+ * only returns true at most every smartlist_len(rl-\>routers)
+ * new descriptors.
+ */
 static INLINE int
 routerlist_is_overfull(routerlist_t *rl)
 {