aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_edge.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-01-05 16:02:43 -0500
committerNick Mathewson <nickm@torproject.org>2011-01-05 16:02:43 -0500
commit31d6659d974800e972af43856405e8a7abe08f72 (patch)
treed971ce07d4ebd1f0da6bdf5e13cc536135b8b38a /src/or/connection_edge.c
parent69771bb5fc0fc472436c5f3fe6dfd3bd0f4929da (diff)
downloadtor-31d6659d974800e972af43856405e8a7abe08f72.tar
tor-31d6659d974800e972af43856405e8a7abe08f72.tar.gz
Fix a double-counting bug in addrmap_get_virtual_address
We were decrementing "available" twice for each in-use address we ran across. This would make us declare that we ran out of virtual addresses when the address space was only half full.
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r--src/or/connection_edge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 9ecdf5c7a..6c2377531 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -1178,7 +1178,7 @@ addressmap_get_virtual_address(int type)
++next_virtual_addr;
--available;
log_info(LD_CONFIG, "%d addrs available", (int)available);
- if (! --available) {
+ if (! available) {
log_warn(LD_CONFIG, "Ran out of virtual addresses!");
return NULL;
}