[or-cvs] bugfix: give dir_conn a state before building the bridge, s...
Roger Dingledine
arma at seul.org
Sat Apr 17 20:19:45 UTC 2004
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 */
More information about the tor-commits
mailing list