diff options
author | Roger Dingledine <arma@torproject.org> | 2005-09-12 07:36:26 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2005-09-12 07:36:26 +0000 |
commit | 63bb27f19d6cb1d27ac557220d8f8b0561d5022f (patch) | |
tree | eef8d9f12dbbda47f21c76d732b44f4b208d330a /src/or/or.h | |
parent | 3dc5e77b5867815244e9f37beba56dc995a2fe2b (diff) | |
download | tor-63bb27f19d6cb1d27ac557220d8f8b0561d5022f.tar tor-63bb27f19d6cb1d27ac557220d8f8b0561d5022f.tar.gz |
be more thorough about noticing when a directory request has failed:
it has failed not only when the connection attempt fails, but also
if the conn reaches eof before we get a response that we're happy with.
svn:r5013
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/or/or.h b/src/or/or.h index 2669587ec..cd51a0624 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -298,11 +298,13 @@ typedef enum { #define DIR_CONN_STATE_CLIENT_SENDING 2 /** State for connection to directory server: reading HTTP response. */ #define DIR_CONN_STATE_CLIENT_READING 3 +/** State for connection to directory server: happy and finished. */ +#define DIR_CONN_STATE_CLIENT_FINISHED 4 /** State for connection at directory server: waiting for HTTP request. */ -#define DIR_CONN_STATE_SERVER_COMMAND_WAIT 4 +#define DIR_CONN_STATE_SERVER_COMMAND_WAIT 5 /** State for connection at directory server: sending HTTP response. */ -#define DIR_CONN_STATE_SERVER_WRITING 5 -#define _DIR_CONN_STATE_MAX 5 +#define DIR_CONN_STATE_SERVER_WRITING 6 +#define _DIR_CONN_STATE_MAX 6 #define _CONTROL_CONN_STATE_MIN 1 #define CONTROL_CONN_STATE_OPEN_V0 1 @@ -1697,7 +1699,7 @@ int connection_dir_reached_eof(connection_t *conn); int connection_dir_process_inbuf(connection_t *conn); int connection_dir_finished_flushing(connection_t *conn); int connection_dir_finished_connecting(connection_t *conn); -void connection_dir_connect_failed(connection_t *conn); +void connection_dir_request_failed(connection_t *conn); void parse_dir_policy(void); void free_dir_policy(void); |