diff options
author | fiaxh <git@mx.ax.lt> | 2017-05-24 17:28:39 +0200 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-05-24 17:29:17 +0200 |
commit | 142257a544b36e60b738e55e5f9f096f1169c389 (patch) | |
tree | 0e02590f59615689b4c77dbe5b23e51fd04bb96f /xmpp-vala | |
parent | bcb96909c9b53c2ca5287433f2fef103b0ddf317 (diff) | |
download | dino-142257a544b36e60b738e55e5f9f096f1169c389.tar.gz dino-142257a544b36e60b738e55e5f9f096f1169c389.zip |
fixup bcb9690 (Roster versioning)
Diffstat (limited to 'xmpp-vala')
-rw-r--r-- | xmpp-vala/src/module/xep/0199_ping.vala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xmpp-vala/src/module/xep/0199_ping.vala b/xmpp-vala/src/module/xep/0199_ping.vala index 3b11bd73..6cb3b4ba 100644 --- a/xmpp-vala/src/module/xep/0199_ping.vala +++ b/xmpp-vala/src/module/xep/0199_ping.vala @@ -8,7 +8,7 @@ namespace Xmpp.Xep.Ping { public class Module : XmppStreamModule { public static ModuleIdentity<Module> IDENTITY = new ModuleIdentity<Module>(NS_URI, "0199_ping"); - public void send_ping(XmppStream stream, string jid, ResponseListener listener) { + public void send_ping(XmppStream stream, string jid, ResponseListener? listener) { Iq.Stanza iq = new Iq.Stanza.get(new StanzaNode.build("ping", NS_URI).add_self_xmlns()); iq.to = jid; stream.get_module(Iq.Module.IDENTITY).send_iq(stream, iq, on_ping_response, listener); @@ -35,9 +35,9 @@ namespace Xmpp.Xep.Ping { public void on_iq_set(XmppStream stream, Iq.Stanza iq) { } } - private static void on_ping_response(XmppStream stream, Iq.Stanza iq, Object o) { - ResponseListener listener = o as ResponseListener; - listener.on_result(stream); + private static void on_ping_response(XmppStream stream, Iq.Stanza iq, Object? o) { + ResponseListener? listener = o as ResponseListener; + if (listener != null) listener.on_result(stream); } } |