aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_edge.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-02-29 00:11:37 +0000
committerRoger Dingledine <arma@torproject.org>2004-02-29 00:11:37 +0000
commit195ee8c845482c827761acae07175d57e287717e (patch)
tree525a1159e27089e67e7bc669b3cdd6b8fefd6a8e /src/or/connection_edge.c
parent62d3df8633ff5e00eddc76dc690fe6696f1c583b (diff)
downloadtor-195ee8c845482c827761acae07175d57e287717e.tar
tor-195ee8c845482c827761acae07175d57e287717e.tar.gz
create a separate connection_edge_destroy() function
svn:r1176
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r--src/or/connection_edge.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index b159c194b..9c245044f 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -88,6 +88,16 @@ int connection_edge_process_inbuf(connection_t *conn) {
return -1;
}
+int connection_edge_destroy(uint16_t circ_id, connection_t *conn) {
+ assert(conn->type == CONN_TYPE_AP || conn->type == CONN_TYPE_EXIT);
+
+ log_fn(LOG_INFO,"CircID %d: At an edge. Marking connection for close.",
+ circ_id);
+ conn->has_sent_end = 1; /* we're closing the circuit, nothing to send to */
+ connection_mark_for_close(conn, END_STREAM_REASON_DESTROY);
+ return 0;
+}
+
static char *connection_edge_end_reason(char *payload, uint16_t length) {
if(length < 1) {
log_fn(LOG_WARN,"End cell arrived with length 0. Should be at least 1.");