diff options
author | Roger Dingledine <arma@torproject.org> | 2004-05-12 21:12:33 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-05-12 21:12:33 +0000 |
commit | 1cf183699059c4c9fc430247fb058226ac110ad0 (patch) | |
tree | fa9e713ba89e11c7422d265638fa5d1c95c0d68e /src/or/directory.c | |
parent | 537fb82cbb3b0488535f94bbccb0899f1b6b027a (diff) | |
download | tor-1cf183699059c4c9fc430247fb058226ac110ad0.tar.gz tor-1cf183699059c4c9fc430247fb058226ac110ad0.zip |
break connection_edge_end out of connection_mark_for_close
svn:r1858
Diffstat (limited to 'src/or/directory.c')
-rw-r--r-- | src/or/directory.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index 187531e529..083fa8cc71 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -106,7 +106,7 @@ void directory_initiate_command(routerinfo_t *router, int purpose, conn->s = connection_ap_make_bridge(conn->address, conn->port); if(conn->s < 0) { log_fn(LOG_WARN,"Making AP bridge to dirserver failed."); - connection_mark_for_close(conn, 0); + connection_mark_for_close(conn); return; } @@ -232,7 +232,7 @@ int connection_dir_process_inbuf(connection_t *conn) { if(conn->state != DIR_CONN_STATE_CLIENT_READING) { log_fn(LOG_INFO,"conn reached eof, not reading. Closing."); connection_close_immediate(conn); /* it was an error; give up on flushing */ - connection_mark_for_close(conn,0); + connection_mark_for_close(conn); return -1; } @@ -241,11 +241,11 @@ int connection_dir_process_inbuf(connection_t *conn) { &body, &body_len, MAX_DIR_SIZE)) { case -1: /* overflow */ log_fn(LOG_WARN,"'fetch' response too large. Failing."); - connection_mark_for_close(conn,0); + connection_mark_for_close(conn); return -1; case 0: log_fn(LOG_INFO,"'fetch' response not all here, but we're at eof. Closing."); - connection_mark_for_close(conn,0); + connection_mark_for_close(conn); return -1; /* case 1, fall through */ } @@ -253,7 +253,7 @@ int connection_dir_process_inbuf(connection_t *conn) { if(parse_http_response(headers, &status_code, NULL) < 0) { log_fn(LOG_WARN,"Unparseable headers. Closing."); free(body); free(headers); - connection_mark_for_close(conn,0); + connection_mark_for_close(conn); return -1; } @@ -263,14 +263,14 @@ int connection_dir_process_inbuf(connection_t *conn) { if(status_code == 503 || body_len == 0) { log_fn(LOG_INFO,"Empty directory. Ignoring."); free(body); free(headers); - connection_mark_for_close(conn,0); + connection_mark_for_close(conn); return 0; } if(status_code != 200) { log_fn(LOG_WARN,"Received http status code %d from dirserver. Failing.", status_code); free(body); free(headers); - connection_mark_for_close(conn,0); + connection_mark_for_close(conn); return -1; } if(router_set_routerlist_from_directory(body, conn->identity_pkey) < 0){ @@ -338,14 +338,14 @@ int connection_dir_process_inbuf(connection_t *conn) { } } free(body); free(headers); - connection_mark_for_close(conn,0); + connection_mark_for_close(conn); return 0; } /* endif 'reached eof' */ /* If we're on the dirserver side, look for a command. */ if(conn->state == DIR_CONN_STATE_SERVER_COMMAND_WAIT) { if (directory_handle_command(conn) < 0) { - connection_mark_for_close(conn,0); + connection_mark_for_close(conn); return -1; } return 0; @@ -538,7 +538,7 @@ int connection_dir_finished_flushing(connection_t *conn) { return 0; case DIR_CONN_STATE_SERVER_WRITING: log_fn(LOG_INFO,"Finished writing server response. Closing."); - connection_mark_for_close(conn,0); + connection_mark_for_close(conn); return 0; default: log_fn(LOG_WARN,"BUG: called in unexpected state %d.", conn->state); |