diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-10-13 21:16:51 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-10-13 21:16:51 +0200 |
commit | 48253b1103dcdcd8252808bd021519772b223143 (patch) | |
tree | 709f588d9a3d5af774a071fd412993ac5f48018a /src/modules/m_spanningtree/utils.cpp | |
parent | 156c35c91f5c69a77a76f6b60db1ea61581bc13f (diff) |
m_spanningtree Rebuild serverlist and sidlist when receiving a specific Request
Issue #923
Diffstat (limited to 'src/modules/m_spanningtree/utils.cpp')
-rw-r--r-- | src/modules/m_spanningtree/utils.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp index 3bd0aa2c7..367a3b921 100644 --- a/src/modules/m_spanningtree/utils.cpp +++ b/src/modules/m_spanningtree/utils.cpp @@ -428,3 +428,16 @@ Link* SpanningTreeUtilities::FindLink(const std::string& name) } return NULL; } + +void SpanningTreeUtilities::Rehash() +{ + server_hash temp; + for (server_hash::const_iterator i = serverlist.begin(); i != serverlist.end(); ++i) + temp.insert(std::make_pair(i->first, i->second)); + serverlist.swap(temp); + temp.clear(); + + for (server_hash::const_iterator i = sidlist.begin(); i != sidlist.end(); ++i) + temp.insert(std::make_pair(i->first, i->second)); + sidlist.swap(temp); +} |