backport r11247

svn:r11248
This commit is contained in:
Roger Dingledine 2007-08-22 03:04:09 +00:00
parent 2fb3f9beba
commit a5b347e9f4
2 changed files with 4 additions and 1 deletions

View File

@ -43,6 +43,8 @@ Changes in version 0.1.2.17 - 2007-08-xx
encourage people using them to stop.
- Terminate multi-line control events properly. Original patch
from tup.
- Fix a minor memory leak when we fail to find enough suitable
servers to choose a circuit.
Changes in version 0.1.2.16 - 2007-08-01

View File

@ -1253,7 +1253,7 @@ choose_good_exit_server_general(routerlist_t *dir, int need_uptime,
* at least one predicted exit port. */
int try;
smartlist_t *needed_ports = circuit_get_unhandled_ports(time(NULL));
smartlist_t *needed_ports;
if (best_support == -1) {
if (need_uptime || need_capacity) {
@ -1271,6 +1271,7 @@ choose_good_exit_server_general(routerlist_t *dir, int need_uptime,
log_notice(LD_CIRC, "All routers are down or won't exit -- choosing a "
"doomed exit at random.");
}
needed_ports = circuit_get_unhandled_ports(time(NULL));
for (try = 0; try < 2; try++) {
/* try once to pick only from routers that satisfy a needed port,
* then if there are none, pick from any that support exiting. */