aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2003-09-21 06:15:43 +0000
committerRoger Dingledine <arma@torproject.org>2003-09-21 06:15:43 +0000
commited51df7453b51ac5263fcc43f46cea26022d17da (patch)
tree8a1b76a63a28375b310077c564c9ca01c85a72ab /src/or/connection.c
parent7afe2adbaf09a3743ff6ce05d2c6ccdb19dca50c (diff)
downloadtor-ed51df7453b51ac5263fcc43f46cea26022d17da.tar.gz
tor-ed51df7453b51ac5263fcc43f46cea26022d17da.zip
bugfixes and note missing features
deal with content-length headers better when reading http don't assume struct socks4_info is a packed struct fail the socks handshake if destip is zero flesh out conn_state_to_string() for dir conn fix typo (bug) in connection_handle_read() directory get is now called fetch, post is now upload reopen logs on sighup svn:r475
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 64355e1aad..89db3bc4ee 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -47,11 +47,14 @@ char *conn_state_to_string[][15] = {
"waiting for OR connection", /* 4 */
"open" }, /* 5 */
{ "ready" }, /* dir listener, 0 */
- { "connecting", /* 0 */
- "sending command", /* 1 */
- "reading", /* 2 */
- "awaiting command", /* 3 */
- "writing" }, /* 4 */
+ { "connecting (fetch)", /* 0 */
+ "connecting (upload)", /* 1 */
+ "client sending fetch", /* 2 */
+ "client sending upload", /* 3 */
+ "client reading fetch", /* 4 */
+ "client reading upload", /* 5 */
+ "awaiting command", /* 6 */
+ "writing" }, /* 7 */
{ "idle", /* dns worker, 0 */
"busy" }, /* 1 */
{ "idle", /* cpu worker, 0 */
@@ -437,7 +440,8 @@ int connection_handle_read(connection_t *conn) {
if(connection_read_to_buf(conn) < 0) {
if(conn->type == CONN_TYPE_DIR &&
- (conn->state == DIR_CONN_STATE_CONNECTING_GET || DIR_CONN_STATE_CONNECTING_POST)) {
+ (conn->state == DIR_CONN_STATE_CONNECTING_FETCH ||
+ conn->state == DIR_CONN_STATE_CONNECTING_UPLOAD)) {
/* it's a directory server and connecting failed: forget about this router */
/* XXX I suspect pollerr may make Windows not get to this point. :( */
router_forget_router(conn->addr,conn->port);