[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Implement channel_set_cmux_policy_everywhere()
commit 8afe41b481caa984fa6b4a0fbbf626d4cd22ce59
Author: Andrea Shepard <andrea@xxxxxxxxxxxxxx>
Date: Mon Oct 1 20:05:03 2012 -0700
Implement channel_set_cmux_policy_everywhere()
---
src/or/channel.c | 16 ++++++++++++++++
src/or/channel.h | 3 +++
2 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/src/or/channel.c b/src/or/channel.c
index 4ad5bf1..880fa63 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;
diff --git a/src/or/channel.h b/src/or/channel.h
index 4d3db41..cb9835a 100644
--- a/src/or/channel.h
+++ b/src/or/channel.h
@@ -291,6 +291,9 @@ void channel_free_all(void);
void channel_dumpstats(int severity);
void channel_listener_dumpstats(int severity);
+/* Set the cmux policy on all active channels */
+void channel_set_cmux_policy_everywhere(circuitmux_policy_t *pol);
+
#ifdef _TOR_CHANNEL_INTERNAL
/* Channel operations for subclasses and internal use only */
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits