[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] bugfix: don"t segfault if there"s no valid circuit open
- To: or-cvs@freehaven.net
- Subject: [or-cvs] bugfix: don"t segfault if there"s no valid circuit open
- From: arma@seul.org (Roger Dingledine)
- Date: Fri, 18 Apr 2003 20:24:20 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Fri, 18 Apr 2003 20:24:27 -0400
- Reply-to: or-dev@freehaven.net
- Sender: owner-or-cvs@freehaven.net
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home/arma/work/onion/cvs/src/or
Modified Files:
connection_ap.c
Log Message:
bugfix: don't segfault if there's no valid circuit open
Index: connection_ap.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_ap.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- connection_ap.c 17 Apr 2003 17:10:40 -0000 1.37
+++ connection_ap.c 19 Apr 2003 00:24:17 -0000 1.38
@@ -95,14 +95,13 @@
/* find the circuit that we should use, if there is one. */
circ = circuit_get_newest_by_edge_type(EDGE_AP);
- circ->dirty = 1;
-
- /* now we're all ready to make an onion or send a begin */
if(!circ) {
log(LOG_INFO,"ap_handshake_process_socks(): No circuit ready. Closing.");
return -1;
}
+
+ circ->dirty = 1;
/* add it into the linked list of topics on this circuit */
log(LOG_DEBUG,"ap_handshake_process_socks(): attaching new conn to circ. n_aci %d.", circ->n_aci);