diff options
author | hrxi <hrrrxi@gmail.com> | 2019-08-06 20:30:18 +0200 |
---|---|---|
committer | hrxi <hrrrxi@gmail.com> | 2019-08-06 21:12:41 +0200 |
commit | 2327dc783c56c7b82ad82c9e9ba5670807a467d2 (patch) | |
tree | 7024d98bd42316aa328cfca6fc15376505dd6df5 /xmpp-vala | |
parent | 4e0adcd2b4cae09b8ede7cf4f357e447afd1e723 (diff) | |
download | dino-2327dc783c56c7b82ad82c9e9ba5670807a467d2.tar.gz dino-2327dc783c56c7b82ad82c9e9ba5670807a467d2.zip |
Send Jingle errors to the right JID
Diffstat (limited to 'xmpp-vala')
-rw-r--r-- | xmpp-vala/src/module/xep/0166_jingle.vala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xmpp-vala/src/module/xep/0166_jingle.vala b/xmpp-vala/src/module/xep/0166_jingle.vala index 150fed8c..34816fcd 100644 --- a/xmpp-vala/src/module/xep/0166_jingle.vala +++ b/xmpp-vala/src/module/xep/0166_jingle.vala @@ -35,7 +35,7 @@ void send_iq_error(IqError iq_error, XmppStream stream, Iq.Stanza iq) { } else { assert_not_reached(); } - stream.get_module(Iq.Module.IDENTITY).send_iq(stream, new Iq.Stanza.error(iq, error)); + stream.get_module(Iq.Module.IDENTITY).send_iq(stream, new Iq.Stanza.error(iq, error) { to=iq.from }); } public errordomain Error { @@ -274,7 +274,7 @@ public class Module : XmppStreamModule, Iq.Handler { if (action == "session-initiate") { if (session != null) { // TODO(hrxi): Info leak if other clients use predictable session IDs? - stream.get_module(Iq.Module.IDENTITY).send_iq(stream, new Iq.Stanza.error(iq, new ErrorStanza.build(ErrorStanza.TYPE_MODIFY, ErrorStanza.CONDITION_CONFLICT, "session ID already in use", null))); + stream.get_module(Iq.Module.IDENTITY).send_iq(stream, new Iq.Stanza.error(iq, new ErrorStanza.build(ErrorStanza.TYPE_MODIFY, ErrorStanza.CONDITION_CONFLICT, "session ID already in use", null)) { to=iq.from }); return; } handle_session_initiate(stream, sid, jingle, iq); @@ -282,7 +282,7 @@ public class Module : XmppStreamModule, Iq.Handler { } if (session == null) { StanzaNode unknown_session = new StanzaNode.build("unknown-session", ERROR_NS_URI).add_self_xmlns(); - stream.get_module(Iq.Module.IDENTITY).send_iq(stream, new Iq.Stanza.error(iq, new ErrorStanza.item_not_found(unknown_session))); + stream.get_module(Iq.Module.IDENTITY).send_iq(stream, new Iq.Stanza.error(iq, new ErrorStanza.item_not_found(unknown_session)) { to=iq.from }); return; } session.handle_iq_set(stream, action, jingle, iq); |