diff options
author | fiaxh <git@mx.ax.lt> | 2018-03-10 19:46:08 +0100 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2018-03-10 20:01:22 +0100 |
commit | 4ccdc1d0920a93b313d81b4014b6f45efb49b1fe (patch) | |
tree | d3e293ffc25d55e46b07ad052fc49166b23de952 /xmpp-vala | |
parent | c6ff25cc7a410416ab3f83565205d4841c97e4cb (diff) | |
download | dino-4ccdc1d0920a93b313d81b4014b6f45efb49b1fe.tar.gz dino-4ccdc1d0920a93b313d81b4014b6f45efb49b1fe.zip |
Small connection fixes
Diffstat (limited to 'xmpp-vala')
-rw-r--r-- | xmpp-vala/src/core/xmpp_stream.vala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xmpp-vala/src/core/xmpp_stream.vala b/xmpp-vala/src/core/xmpp_stream.vala index 09e973bd..98c89716 100644 --- a/xmpp-vala/src/core/xmpp_stream.vala +++ b/xmpp-vala/src/core/xmpp_stream.vala @@ -151,6 +151,12 @@ public class XmppStream { } public XmppStream add_module(XmppStreamModule module) { + foreach (XmppStreamModule m in modules) { + if (m.get_ns() == module.get_ns() && m.get_id() == module.get_id()) { + print("[%p] Adding already added module: %s\n".printf(this, module.get_id())); + return this; + } + } modules.add(module); if (negotiation_complete) module.attach(this); return this; |