summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-07-04 17:00:05 +0200
committerlouiz’ <louiz@louiz.org>2016-07-04 17:00:05 +0200
commit5321d29cbda7d69d306f36d0f84d2c599c85c90e (patch)
tree74e8d6da166d12689871f9439518aa554724e4a9 /src
parent964784497a7dd1278789f63322cb8acc8ed419ba (diff)
downloadbiboumi-5321d29cbda7d69d306f36d0f84d2c599c85c90e.tar.gz
biboumi-5321d29cbda7d69d306f36d0f84d2c599c85c90e.tar.bz2
biboumi-5321d29cbda7d69d306f36d0f84d2c599c85c90e.tar.xz
biboumi-5321d29cbda7d69d306f36d0f84d2c599c85c90e.zip
List of channels are saved per-request and not globally
The list would keep the previous results in memory, forever, and the list would grow each time a new request was made (even with results from unrelated servers)…
Diffstat (limited to 'src')
-rw-r--r--src/bridge/bridge.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp
index 613e0e2..1ca611a 100644
--- a/src/bridge/bridge.cpp
+++ b/src/bridge/bridge.cpp
@@ -368,11 +368,11 @@ void Bridge::send_irc_channel_list_request(const Iid& iid, const std::string& iq
irc->send_list_command();
- irc_responder_callback_t cb = [this, iid, iq_id, to_jid](const std::string& irc_hostname,
- const IrcMessage& message) -> bool
- {
- static std::vector<ListElement> list;
+ std::vector<ListElement> list;
+ irc_responder_callback_t cb = [this, iid, iq_id, to_jid, list=std::move(list)](const std::string& irc_hostname,
+ const IrcMessage& message) mutable -> bool
+ {
if (irc_hostname != iid.get_server())
return false;
if (message.command == "263" || message.command == "RPL_TRYAGAIN" ||