[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] bugfix: give dir_conn a state before building the bridge, s...
- To: or-cvs@freehaven.net
- Subject: [or-cvs] bugfix: give dir_conn a state before building the bridge, s...
- From: arma@seul.org (Roger Dingledine)
- Date: Sat, 17 Apr 2004 16:19:45 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Sat, 17 Apr 2004 16:20:02 -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:/home2/arma/work/onion/cvs/src/or
Modified Files:
directory.c
Log Message:
bugfix: give dir_conn a state before building the bridge, so it has
a state if things fail
Index: directory.c
===================================================================
RCS file: /home/or/cvsroot/src/or/directory.c,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- directory.c 9 Apr 2004 20:23:25 -0000 1.90
+++ directory.c 17 Apr 2004 20:19:43 -0000 1.91
@@ -58,12 +58,12 @@
/* queue the command on the outbuf */
directory_send_command(conn, purpose, payload, payload_len);
+ /* give it an initial state */
+ conn->state = DIR_CONN_STATE_CONNECTING;
+
if(purpose == DIR_PURPOSE_FETCH_DIR ||
purpose == DIR_PURPOSE_UPLOAD_DIR) {
-
/* then we want to connect directly */
- conn->state = DIR_CONN_STATE_CONNECTING;
-
switch(connection_connect(conn, conn->address, conn->addr, conn->port)) {
case -1:
router_mark_as_down(conn->nickname); /* don't try him again */