aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-03-04 21:08:28 +0000
committerNick Mathewson <nickm@torproject.org>2007-03-04 21:08:28 +0000
commit92f62b36846e3c82f5521fa17f7a4f5afde827af (patch)
tree0be93b2e4b4513bf20ac1649f26b441d2879f07a /src/or/connection.c
parent4a6e29b0296531beb0463afd5495347f7b6d9dc1 (diff)
downloadtor-92f62b36846e3c82f5521fa17f7a4f5afde827af.tar
tor-92f62b36846e3c82f5521fa17f7a4f5afde827af.tar.gz
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
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c12
1 files changed, 4 insertions, 8 deletions
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;