From acda845b2aa212ff19b2b0c10d77a2b7eb090156 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Fri, 26 Mar 2021 10:05:24 +0100 Subject: iq: use define for 'cancel' --- src/xmpp/iq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index e3b2314c..beecb97e 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -1450,7 +1450,7 @@ _auto_pong_id_handler(xmpp_stanza_t* const stanza, void* const userdata) if (errtype == NULL) { return 0; } - if (g_strcmp0(errtype, "cancel") == 0) { + if (g_strcmp0(errtype, STANZA_TYPE_CANCEL) == 0) { log_warning("Server ping (id=%s) error type 'cancel', disabling autoping.", id); prefs_set_autoping(0); cons_show_error("Server ping not supported, autoping disabled."); @@ -1766,7 +1766,7 @@ _last_activity_get_handler(xmpp_stanza_t* const stanza) xmpp_stanza_t* error = xmpp_stanza_new(ctx); xmpp_stanza_set_name(error, STANZA_NAME_ERROR); - xmpp_stanza_set_type(error, "cancel"); + xmpp_stanza_set_type(error, STANZA_TYPE_CANCEL); xmpp_stanza_t* service_unavailable = xmpp_stanza_new(ctx); xmpp_stanza_set_name(service_unavailable, "service-unavailable"); -- cgit 1.4.1-2-gfad0