summaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-15 10:31:21 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-15 10:31:21 -0400
commit1416f54d1eb2651e6b82ccbe35585ce71378de8a (patch)
treed634752c0f3d1f2d2aefec21819d31874adad4a6 /src/or/connection.c
parent3b917b2408748efb2ce84c2725e2e81ee0217e03 (diff)
downloadtor-1416f54d1eb2651e6b82ccbe35585ce71378de8a.tar.gz
tor-1416f54d1eb2651e6b82ccbe35585ce71378de8a.zip
Split dir_connection_t into its own header
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 0042d3e0d0..8c7341992d 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -113,6 +113,7 @@
#include <sys/un.h>
#endif
+#include "dir_connection_st.h"
#include "control_connection_st.h"
#include "entry_connection_st.h"
#include "port_cfg_st.h"
@@ -4112,6 +4113,13 @@ connection_write_to_buf_impl_,(const char *string, size_t len,
connection_write_to_buf_commit(conn, written);
}
+void
+connection_buf_add_compress(const char *string, size_t len,
+ dir_connection_t *conn, int done)
+{
+ connection_write_to_buf_impl_(string, len, TO_CONN(conn), done ? -1 : 1);
+}
+
/**
* Add all bytes from <b>buf</b> to <b>conn</b>'s outbuf, draining them
* from <b>buf</b>. (If the connection is marked and will soon be closed,