summaryrefslogtreecommitdiff
path: root/src/or/channel.c
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@torproject.org>2012-10-01 20:05:03 -0700
committerAndrea Shepard <andrea@torproject.org>2012-10-10 00:44:46 -0700
commit8afe41b481caa984fa6b4a0fbbf626d4cd22ce59 (patch)
treed5bfc3e58d1c1b369fffa9fe0e0916ff66ae4904 /src/or/channel.c
parent13972aee78542f654bcbbdaf09a49df9fed75738 (diff)
downloadtor-8afe41b481caa984fa6b4a0fbbf626d4cd22ce59.tar.gz
tor-8afe41b481caa984fa6b4a0fbbf626d4cd22ce59.zip
Implement channel_set_cmux_policy_everywhere()
Diffstat (limited to 'src/or/channel.c')
-rw-r--r--src/or/channel.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/or/channel.c b/src/or/channel.c
index 4ad5bf15f3..880fa63ca5 100644
--- a/src/or/channel.c
+++ b/src/or/channel.c
@@ -2696,6 +2696,22 @@ channel_listener_dumpstats(int severity)
}
/**
+ * Set the cmux policy on all active channels
+ */
+
+void
+channel_set_cmux_policy_everywhere(circuitmux_policy_t *pol)
+{
+ if (!active_channels) return;
+
+ SMARTLIST_FOREACH_BEGIN(active_channels, channel_t *, curr) {
+ if (curr->cmux) {
+ circuitmux_set_policy(curr->cmux, pol);
+ }
+ } SMARTLIST_FOREACH_END(curr);
+}
+
+/**
* Clean up channels
*
* This gets called periodically from run_scheduled_events() in main.c;