From 142257a544b36e60b738e55e5f9f096f1169c389 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Wed, 24 May 2017 17:28:39 +0200 Subject: fixup bcb9690 (Roster versioning) --- xmpp-vala/src/module/xep/0199_ping.vala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xmpp-vala') 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 IDENTITY = new ModuleIdentity(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); } } -- cgit v1.2.3-70-g09d2