about summary refs log tree commit diff stats
path: root/src/xmpp
diff options
context:
space:
mode:
authorSteffen Jaeckel <jaeckel-floss@eyet-services.de>2023-01-26 11:50:02 +0100
committerSteffen Jaeckel <jaeckel-floss@eyet-services.de>2023-01-26 11:50:02 +0100
commit901ef217278de331b9d225ea483be3ffad295885 (patch)
treeb900a3817b383a35df5353616e05cb5bed3dfd82 /src/xmpp
parentf406384c3412d15637a26a6a64ef5d3b8375f40c (diff)
downloadprofani-tty-901ef217278de331b9d225ea483be3ffad295885.tar.gz
simplify some code
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/iq.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c
index 592b6a86..e6c1f6dc 100644
--- a/src/xmpp/iq.c
+++ b/src/xmpp/iq.c
@@ -1462,8 +1462,7 @@ _auto_pong_id_handler(xmpp_stanza_t* const stanza, void* const userdata)
         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.");
-        xmpp_conn_t* conn = connection_get_conn();
-        xmpp_timed_handler_delete(conn, _autoping_timed_send);
+        xmpp_timed_handler_delete(connection_get_conn(), _autoping_timed_send);
     }
 
     return 0;
@@ -1531,8 +1530,7 @@ _version_result_id_handler(xmpp_stanza_t* const stanza, void* const userdata)
         log_warning("From attribute specified different JID, using original JID.");
     }
 
-    xmpp_conn_t* conn = connection_get_conn();
-    xmpp_ctx_t* ctx = xmpp_conn_get_context(conn);
+    xmpp_ctx_t* ctx = connection_get_ctx();
 
     Jid* jidp = jid_create((char*)userdata);