aboutsummaryrefslogtreecommitdiff
path: root/src/or/channeltls.c
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@torproject.org>2012-10-01 20:27:01 -0700
committerAndrea Shepard <andrea@torproject.org>2012-10-10 00:44:47 -0700
commitbb62281ba48d946e2f948a9c3088f1d0ca481d57 (patch)
tree6d80419b353bd108ac62b1e1896f9ae7a72dfa1a /src/or/channeltls.c
parent0c4f717b3e83e86fc8646d3803c1e435c6af246d (diff)
downloadtor-bb62281ba48d946e2f948a9c3088f1d0ca481d57.tar
tor-bb62281ba48d946e2f948a9c3088f1d0ca481d57.tar.gz
Set circuitmux policy on new channels in channeltls.c
Diffstat (limited to 'src/or/channeltls.c')
-rw-r--r--src/or/channeltls.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/or/channeltls.c b/src/or/channeltls.c
index bc7e3ec9d..764de80a7 100644
--- a/src/or/channeltls.c
+++ b/src/or/channeltls.c
@@ -17,6 +17,7 @@
#include "channel.h"
#include "channeltls.h"
#include "circuitmux.h"
+#include "circuitmux_ewma.h"
#include "config.h"
#include "connection.h"
#include "connection_or.h"
@@ -129,7 +130,9 @@ channel_tls_connect(const tor_addr_t *addr, uint16_t port,
channel_mark_outgoing(chan);
chan->cmux = circuitmux_alloc();
- /* TODO set cmux policy */
+ if (cell_ewma_enabled()) {
+ circuitmux_set_policy(chan->cmux, &ewma_policy);
+ }
/* Set up or_connection stuff */
tlschan->conn = connection_or_connect(addr, port, id_digest, tlschan);
@@ -262,7 +265,9 @@ channel_tls_handle_incoming(or_connection_t *orconn)
channel_mark_incoming(chan);
chan->cmux = circuitmux_alloc();
- /* TODO set cmux policy */
+ if (cell_ewma_enabled()) {
+ circuitmux_set_policy(chan->cmux, &ewma_policy);
+ }
/* If we got one, we should register it */
if (chan) channel_register(chan);