[or-cvs] bugfix: when a resolve fails for a begin request, actually ...

Roger Dingledine arma at seul.org
Tue Sep 21 17:33:07 UTC 2004


Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or

Modified Files:
	dns.c 
Log Message:
bugfix: when a resolve fails for a begin request, actually send
the end cell back. also, give a better reason for failure.


Index: dns.c
===================================================================
RCS file: /home/or/cvsroot/src/or/dns.c,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -d -r1.107 -r1.108
--- dns.c	21 Sep 2004 16:42:07 -0000	1.107
+++ dns.c	21 Sep 2004 17:33:05 -0000	1.108
@@ -495,10 +495,9 @@
       /* prevent double-remove. */
       pendconn->state = EXIT_CONN_STATE_RESOLVEFAILED;
       if (pendconn->purpose == EXIT_PURPOSE_CONNECT) {
-        /*XXXX can we safely raise the detach here to happen after we
-         * send the end cell? */
+        connection_edge_end(pendconn, END_STREAM_REASON_RESOLVEFAILED, pendconn->cpath_layer);
+        /* This detach must happen after we send the end cell. */
         circuit_detach_stream(circuit_get_by_conn(pendconn), pendconn);
-        connection_edge_end(pendconn, END_STREAM_REASON_MISC, pendconn->cpath_layer);
       } else {
         send_resolved_cell(pendconn, RESOLVED_TYPE_ERROR);
         /* This detach must happen after we send the resolved cell. */



More information about the tor-commits mailing list