1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

simplify some code

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
Steffen Jaeckel 2023-01-26 11:50:02 +01:00
parent f406384c34
commit 901ef21727

View File

@ -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);