diff --git a/src/xmpp.h b/src/xmpp.h index 7513608e..d1f88055 100644 --- a/src/xmpp.h +++ b/src/xmpp.h @@ -169,7 +169,7 @@ void jabber_conn_set_status(const char * const message); char* jabber_get_account_name(void); // iq functions -void iq_add_handlers(xmpp_conn_t * const conn, xmpp_ctx_t * const ctx); +void iq_add_handlers(void); // presence functions void presence_init(void); diff --git a/src/xmpp_conn.c b/src/xmpp_conn.c index 9bf94074..2d1a3076 100644 --- a/src/xmpp_conn.c +++ b/src/xmpp_conn.c @@ -665,7 +665,7 @@ _connection_handler(xmpp_conn_t * const conn, xmpp_handler_add(conn, _message_handler, NULL, STANZA_NAME_MESSAGE, NULL, ctx); xmpp_handler_add(conn, presence_handler, NULL, STANZA_NAME_PRESENCE, NULL, ctx); - iq_add_handlers(conn, ctx); + iq_add_handlers(); if (prefs_get_autoping() != 0) { int millis = prefs_get_autoping() * 1000; diff --git a/src/xmpp_iq.c b/src/xmpp_iq.c index fbef60ca..dae22ddb 100644 --- a/src/xmpp_iq.c +++ b/src/xmpp_iq.c @@ -49,8 +49,10 @@ static int _iq_handle_discoinfo_result(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void * const userdata); void -iq_add_handlers(xmpp_conn_t * const conn, xmpp_ctx_t * const ctx) +iq_add_handlers(void) { + xmpp_conn_t * const conn = jabber_get_conn(); + xmpp_ctx_t * const ctx = jabber_get_ctx(); HANDLE(NULL, STANZA_TYPE_ERROR, _iq_handle_error); HANDLE(XMPP_NS_ROSTER, STANZA_TYPE_SET, _iq_handle_roster_set); HANDLE(XMPP_NS_ROSTER, STANZA_TYPE_RESULT, _iq_handle_roster_result);