about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2021-03-26 10:05:24 +0100
committerMichael Vetter <jubalh@iodoru.org>2021-03-26 10:05:24 +0100
commitacda845b2aa212ff19b2b0c10d77a2b7eb090156 (patch)
treec12bc67610258af450edff2a32fe3031cb081e5e
parent3884a4d35bce3e306fc1b7e02d55184bc7a90f19 (diff)
downloadprofani-tty-acda845b2aa212ff19b2b0c10d77a2b7eb090156.tar.gz
iq: use define for 'cancel'
-rw-r--r--src/xmpp/iq.c4
1 files 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");