Loading ChangeLog +2 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,8 @@ Changes in version 0.2.0.19-alpha - 2008-02-?? - If an attempt to launch a DNS resolve request over the control port fails because we have overrun the limit on the number of connections, tell the controller that the request has failed. - Avoid using too little bandwidth when Tor skips a few seconds. Bugfix on 0.1.2.x. o Code simplifications and refactoring: - Remove some needless generality from cpuworker code, for improved Loading src/or/connection.c +13 −7 Original line number Diff line number Diff line Loading @@ -1659,14 +1659,20 @@ connection_bucket_refill_helper(int *bucket, int rate, int burst, int seconds_elapsed, const char *name) { int starting_bucket = *bucket; if (starting_bucket < burst) { if (starting_bucket < burst && seconds_elapsed) { if (((burst - starting_bucket)/seconds_elapsed) < rate) { *bucket = burst; /* We would overflow the bucket; just set it to * the maximum. */ } else { int incr = rate*seconds_elapsed; *bucket += incr; if (*bucket > burst || *bucket < starting_bucket) { /* If we overflow the burst, or underflow our starting bucket, * cap the bucket value to burst. */ /* XXXX020 this might be redundant now. */ *bucket = burst; } } log(LOG_DEBUG, LD_NET,"%s now %d.", name, *bucket); } } Loading Loading
ChangeLog +2 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,8 @@ Changes in version 0.2.0.19-alpha - 2008-02-?? - If an attempt to launch a DNS resolve request over the control port fails because we have overrun the limit on the number of connections, tell the controller that the request has failed. - Avoid using too little bandwidth when Tor skips a few seconds. Bugfix on 0.1.2.x. o Code simplifications and refactoring: - Remove some needless generality from cpuworker code, for improved Loading
src/or/connection.c +13 −7 Original line number Diff line number Diff line Loading @@ -1659,14 +1659,20 @@ connection_bucket_refill_helper(int *bucket, int rate, int burst, int seconds_elapsed, const char *name) { int starting_bucket = *bucket; if (starting_bucket < burst) { if (starting_bucket < burst && seconds_elapsed) { if (((burst - starting_bucket)/seconds_elapsed) < rate) { *bucket = burst; /* We would overflow the bucket; just set it to * the maximum. */ } else { int incr = rate*seconds_elapsed; *bucket += incr; if (*bucket > burst || *bucket < starting_bucket) { /* If we overflow the burst, or underflow our starting bucket, * cap the bucket value to burst. */ /* XXXX020 this might be redundant now. */ *bucket = burst; } } log(LOG_DEBUG, LD_NET,"%s now %d.", name, *bucket); } } Loading