diff options
author | fiaxh <git@mx.ax.lt> | 2017-06-13 18:14:59 +0200 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-06-13 20:12:40 +0200 |
commit | 7bbbb738fdb233f4ad91ffdd7d9247b28849d715 (patch) | |
tree | 649ac26e3feef6bae614442a7f3d6ee1057336e0 /xmpp-vala/src/module/bind.vala | |
parent | dabc2a8b1d2a7bf2019e5f913c736d80f11ceb53 (diff) | |
download | dino-7bbbb738fdb233f4ad91ffdd7d9247b28849d715.tar.gz dino-7bbbb738fdb233f4ad91ffdd7d9247b28849d715.zip |
Get rid of manual storage objects for delegates
Diffstat (limited to 'xmpp-vala/src/module/bind.vala')
-rw-r--r-- | xmpp-vala/src/module/bind.vala | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/xmpp-vala/src/module/bind.vala b/xmpp-vala/src/module/bind.vala index f4b1a948..5a611875 100644 --- a/xmpp-vala/src/module/bind.vala +++ b/xmpp-vala/src/module/bind.vala @@ -34,7 +34,9 @@ namespace Xmpp.Bind { var flag = new Flag(); StanzaNode bind_node = new StanzaNode.build("bind", NS_URI).add_self_xmlns(); bind_node.put_node(new StanzaNode.build("resource", NS_URI).put_node(new StanzaNode.text(requested_resource))); - stream.get_module(Iq.Module.IDENTITY).send_iq(stream, new Iq.Stanza.set(bind_node), on_bind_response); + stream.get_module(Iq.Module.IDENTITY).send_iq(stream, new Iq.Stanza.set(bind_node), (stream, iq) => { + stream.get_module(Bind.Module.IDENTITY).iq_response_stanza(stream, iq); + }); stream.add_flag(flag); } } @@ -62,10 +64,6 @@ namespace Xmpp.Bind { public override string get_ns() { return NS_URI; } public override string get_id() { return IDENTITY.id; } - - private static void on_bind_response(XmppStream stream, Iq.Stanza iq) { - stream.get_module(Bind.Module.IDENTITY).iq_response_stanza(stream, iq); - } } public class Flag : XmppStreamFlag { |