From 92f62b36846e3c82f5521fa17f7a4f5afde827af Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Sun, 4 Mar 2007 21:08:28 +0000 Subject: r12077@catbus: nickm | 2007-03-04 16:08:23 -0500 Remove support for v0 control protocol from 0.2.0.x trunk; send back error when we receive a v0 control message. (Leave "if(v1){...}"blocks indented for now so this patch is easier to read.) ((Finally, the linecount goes _down_ a little.)) svn:r9735 --- src/or/connection.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/or/connection.c') diff --git a/src/or/connection.c b/src/or/connection.c index b2afe178d..c04d3bc37 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -132,11 +132,8 @@ conn_state_to_string(int type, int state) break; case CONN_TYPE_CONTROL: switch (state) { - case CONTROL_CONN_STATE_OPEN_V0: return "open (protocol v0)"; - case CONTROL_CONN_STATE_OPEN_V1: return "open (protocol v1)"; - case CONTROL_CONN_STATE_NEEDAUTH_V0: - return "waiting for authentication (protocol unknown)"; - case CONTROL_CONN_STATE_NEEDAUTH_V1: + case CONTROL_CONN_STATE_OPEN: return "open (protocol v1)"; + case CONTROL_CONN_STATE_NEEDAUTH: return "waiting for authentication (protocol v1)"; } break; @@ -860,7 +857,7 @@ connection_init_accepted_conn(connection_t *conn, uint8_t listener_type) conn->state = DIR_CONN_STATE_SERVER_COMMAND_WAIT; break; case CONN_TYPE_CONTROL: - conn->state = CONTROL_CONN_STATE_NEEDAUTH_V0; + conn->state = CONTROL_CONN_STATE_NEEDAUTH; break; } return 0; @@ -2121,8 +2118,7 @@ connection_state_is_open(connection_t *conn) (conn->type == CONN_TYPE_AP && conn->state == AP_CONN_STATE_OPEN) || (conn->type == CONN_TYPE_EXIT && conn->state == EXIT_CONN_STATE_OPEN) || (conn->type == CONN_TYPE_CONTROL && - (conn->state == CONTROL_CONN_STATE_OPEN_V0 || - conn->state == CONTROL_CONN_STATE_OPEN_V1))) + conn->state == CONTROL_CONN_STATE_OPEN)) return 1; return 0; -- cgit v1.2.3