diff options
author | Roger Dingledine <arma@torproject.org> | 2003-09-27 21:09:56 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2003-09-27 21:09:56 +0000 |
commit | cb8212bfcb56980893993db5bd4098944735b38a (patch) | |
tree | c1f382a4d4d861498956384804e2a55f338237e4 /src/or/dns.c | |
parent | 798bb6ab3b089005fddfded0513edeb2da231354 (diff) | |
download | tor-cb8212bfcb56980893993db5bd4098944735b38a.tar tor-cb8212bfcb56980893993db5bd4098944735b38a.tar.gz |
clean up receiver buckets; prepare for payloads in relay_end; note a few bugs
svn:r502
Diffstat (limited to 'src/or/dns.c')
-rw-r--r-- | src/or/dns.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/or/dns.c b/src/or/dns.c index 1b955cc00..e12f522c6 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -225,7 +225,7 @@ void dns_cancel_pending_resolve(char *question, connection_t *onlyconn) { /* mark all pending connections to fail */ while(resolve->pending_connections) { pend = resolve->pending_connections; - pend->conn->marked_for_close = 1; +/*ENDCLOSE*/ pend->conn->marked_for_close = 1; resolve->pending_connections = pend->next; free(pend); } @@ -278,7 +278,7 @@ static void dns_found_answer(char *question, uint32_t answer) { pend = resolve->pending_connections; pend->conn->addr = resolve->answer; if(resolve->state == CACHE_STATE_FAILED || connection_exit_connect(pend->conn) < 0) { - pend->conn->marked_for_close = 1; +/*ENDCLOSE*/ pend->conn->marked_for_close = 1; } resolve->pending_connections = pend->next; free(pend); @@ -386,8 +386,6 @@ static int spawn_dnsworker(void) { set_socket_nonblocking(fd[0]); /* set up conn so it's got all the data we need to remember */ - conn->receiver_bucket = -1; /* non-cell connections don't do receiver buckets */ - conn->bandwidth = -1; conn->s = fd[0]; conn->address = strdup("localhost"); @@ -420,6 +418,7 @@ static void spawn_enough_dnsworkers(void) { dnsconn->marked_for_close = 1; num_dnsworkers_busy--; + num_dnsworkers--; } if(num_dnsworkers_busy >= MIN_DNSWORKERS) |