diff options
author | Roger Dingledine <arma@torproject.org> | 2003-10-22 07:55:44 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2003-10-22 07:55:44 +0000 |
commit | c6b442a346ac7e096198b9f89368239820290acd (patch) | |
tree | a018d42ec7b7ba288ab5d1354c766f43e033c31b /src/or/dns.c | |
parent | b1eca56b77ba1316eb23587341319fbbe2bc6560 (diff) | |
download | tor-c6b442a346ac7e096198b9f89368239820290acd.tar tor-c6b442a346ac7e096198b9f89368239820290acd.tar.gz |
make end relay cells have payloads
move default exit policy into config files
svn:r653
Diffstat (limited to 'src/or/dns.c')
-rw-r--r-- | src/or/dns.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/dns.c b/src/or/dns.c index ac25a9dd5..6bfed861c 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -220,7 +220,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; - connection_edge_end(pend->conn, NULL, 0, NULL); + connection_edge_end(pend->conn, END_STREAM_REASON_MISC, NULL); resolve->pending_connections = pend->next; free(pend); } @@ -272,9 +272,10 @@ static void dns_found_answer(char *question, uint32_t answer) { while(resolve->pending_connections) { pend = resolve->pending_connections; pend->conn->addr = resolve->answer; - if(resolve->state == CACHE_STATE_FAILED || connection_exit_connect(pend->conn) < 0) { - connection_edge_end(pend->conn, NULL, 0, NULL); - } + if(resolve->state == CACHE_STATE_FAILED) + connection_edge_end(pend->conn, END_STREAM_REASON_RESOLVEFAILED, NULL); + else + connection_exit_connect(pend->conn); resolve->pending_connections = pend->next; free(pend); } |