On Thu, May 31, 2007 at 02:53:18PM -0400, Roger Dingledine wrote: > On Thu, May 31, 2007 at 02:48:31PM -0400, nickm@xxxxxxxx wrote: > > Fix patch r10411; fix from robert hogan. > > > > Property changes on: tor/trunk > > ___________________________________________________________________ > > svk:merge ticket from /tor/trunk [r13103] on 8246c3cf-6607-4228-993b-4d95d33730f1 > > > > Modified: tor/trunk/src/or/config.c > > =================================================================== > > --- tor/trunk/src/or/config.c 2007-05-31 18:48:28 UTC (rev 10421) > > +++ tor/trunk/src/or/config.c 2007-05-31 18:48:31 UTC (rev 10422) > > @@ -2326,7 +2326,7 @@ > > { > > int r; > > char buf[1024]; > > - if (*value == ROUTER_MAX_DECLARED_BANDWIDTH) { > > + if (*value > ROUTER_MAX_DECLARED_BANDWIDTH) { > > /* This handles an understandable special case where somebody says "2gb" > > * whereas our actual maximum is 2gb-1 (INT_MAX) */ > > --*value; > > Don't we need to fix the --*value part too, or most values will > end up causing value to exceed our intended cap? No. At least, not for what I wanted to do here. The goal was to make "2gb" (which is easy to type) into an alias for "2147483647" (2gb-1), which is hard to type, but which is the max allowed declared bandwidth. The goal was _not_ to make e.g. 3gb into an alias for 2gb-1, since exceeding the limit silently was not something we wanted to allow. yrs, -- Nick Mathewson
Attachment:
pgpYs9X4Ehmhq.pgp
Description: PGP signature