diff options
author | Roger Dingledine <arma@torproject.org> | 2004-04-17 20:19:43 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-04-17 20:19:43 +0000 |
commit | 14c30fe9fae525cfa5c5b7259bdc95d56a940cb6 (patch) | |
tree | 1607a064c11355c0f9b0f0e6718aef836f256052 | |
parent | 65d507b98064f301bbfd41da1196a94bcfd5e0d7 (diff) | |
download | tor-14c30fe9fae525cfa5c5b7259bdc95d56a940cb6.tar tor-14c30fe9fae525cfa5c5b7259bdc95d56a940cb6.tar.gz |
bugfix: give dir_conn a state before building the bridge, so it has
a state if things fail
svn:r1660
-rw-r--r-- | src/or/directory.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index b7bcf3c90..a8aa296a2 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -58,12 +58,12 @@ void directory_initiate_command(routerinfo_t *router, int purpose, /* 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 */ |