aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/or/connection.c2
-rw-r--r--src/or/connection_edge.c17
-rw-r--r--src/or/connection_edge.h1
3 files changed, 20 insertions, 0 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index fd30ac8cb6..86ed45e18e 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -3245,6 +3245,8 @@ connection_flushed_some(connection_t *conn)
r = connection_dirserv_flushed_some(TO_DIR_CONN(conn));
} else if (conn->type == CONN_TYPE_OR) {
r = connection_or_flushed_some(TO_OR_CONN(conn));
+ } else if (CONN_IS_EDGE(conn)) {
+ r = connection_edge_flushed_some(TO_EDGE_CONN(conn));
}
conn->in_flushed_some = 0;
return r;
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index f02479fd59..85a52257a8 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -301,6 +301,23 @@ connection_edge_end_errno(edge_connection_t *conn)
return connection_edge_end(conn, reason);
}
+/** We just wrote some data to <b>conn</b>; act appropriately.
+ *
+ * (That is, if it's open, consider sending a stream-level sendme cell if we
+ * have just flushed enough.)
+ */
+int
+connection_edge_flushed_some(edge_connection_t *conn)
+{
+ switch (conn->_base.state) {
+ case AP_CONN_STATE_OPEN:
+ case EXIT_CONN_STATE_OPEN:
+ connection_edge_consider_sending_sendme(conn);
+ break;
+ }
+ return 0;
+}
+
/** Connection <b>conn</b> has finished writing and has no bytes left on
* its outbuf.
*
diff --git a/src/or/connection_edge.h b/src/or/connection_edge.h
index fa5f91cf8d..0b08dd07ca 100644
--- a/src/or/connection_edge.h
+++ b/src/or/connection_edge.h
@@ -23,6 +23,7 @@ int connection_edge_process_inbuf(edge_connection_t *conn,
int connection_edge_destroy(circid_t circ_id, edge_connection_t *conn);
int connection_edge_end(edge_connection_t *conn, uint8_t reason);
int connection_edge_end_errno(edge_connection_t *conn);
+int connection_edge_flushed_some(edge_connection_t *conn);
int connection_edge_finished_flushing(edge_connection_t *conn);
int connection_edge_finished_connecting(edge_connection_t *conn);