summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-02-23 21:56:10 +0000
committerNick Mathewson <nickm@torproject.org>2007-02-23 21:56:10 +0000
commitddc34f603743eea018346a4ada73b43e8de247a8 (patch)
tree0d0a0624427bd5fc4a32fdb3655031a74025553d
parent55cbbdf9bfea465ecbfd5ef67dc7d37650a07018 (diff)
downloadtor-ddc34f603743eea018346a4ada73b43e8de247a8.tar.gz
tor-ddc34f603743eea018346a4ada73b43e8de247a8.zip
r11898@catbus: nickm | 2007-02-23 16:55:43 -0500
Two XXX012 comments turned out to be bogus; remove them and document why. svn:r9625
-rw-r--r--src/or/dns.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/or/dns.c b/src/or/dns.c
index 7ee451826d..47f833c4be 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -565,6 +565,11 @@ parse_inaddr_arpa_address(const char *address, struct in_addr *in)
* if resolve valid, put it into <b>exitconn</b>-\>addr and return 1.
* If resolve failed, unlink exitconn if needed, free it, and return -1.
*
+ * (For EXIT_PURPOSE_RESOLVE connections, send back a RESOLVED error cell
+ * on returning -1. For EXIT_PURPOSE_CONNECT connections, there's no
+ * need to send back an END cell, since connection_exit_begin_conn will
+ * do that for us.)
+ *
* If <b>oncirc</b> is provided, and this is a resolve request, we have
* a cached answer, send the answer back along oncirc; otherwise, send
* the answer back along <b>exitconn</b>'s attached circuit.
@@ -607,7 +612,6 @@ dns_resolve(edge_connection_t *exitconn, or_circuit_t *oncirc)
escaped_safe_str(exitconn->_base.address));
if (is_resolve)
send_resolved_cell(exitconn, oncirc, RESOLVED_TYPE_ERROR);
- /* XXXX012 send error in connect case? -NM */
circ = circuit_get_by_edge_conn(exitconn);
if (circ)
circuit_detach_stream(circ, exitconn);
@@ -697,7 +701,6 @@ dns_resolve(edge_connection_t *exitconn, or_circuit_t *oncirc)
log_debug(LD_EXIT,"Connection (fd %d) found cached error for %s",
exitconn->_base.s,
escaped_safe_str(exitconn->_base.address));
- /* XXXX012 send back indication of failure for connect case? -NM*/
if (is_resolve)
send_resolved_cell(exitconn, oncirc, RESOLVED_TYPE_ERROR);
circ = circuit_get_by_edge_conn(exitconn);