aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/xep/0199_ping.vala
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-05-24 17:28:39 +0200
committerfiaxh <git@mx.ax.lt>2017-05-24 17:29:17 +0200
commit142257a544b36e60b738e55e5f9f096f1169c389 (patch)
tree0e02590f59615689b4c77dbe5b23e51fd04bb96f /xmpp-vala/src/module/xep/0199_ping.vala
parentbcb96909c9b53c2ca5287433f2fef103b0ddf317 (diff)
downloaddino-142257a544b36e60b738e55e5f9f096f1169c389.tar.gz
dino-142257a544b36e60b738e55e5f9f096f1169c389.zip
fixup bcb9690 (Roster versioning)
Diffstat (limited to 'xmpp-vala/src/module/xep/0199_ping.vala')
-rw-r--r--xmpp-vala/src/module/xep/0199_ping.vala8
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);
}
}