diff --git a/src/main.c b/src/main.c index 2fea7ba0..d933a03c 100644 --- a/src/main.c +++ b/src/main.c @@ -42,6 +42,7 @@ _init_modules(void) jabber_init_module(); bookmark_init_module(); capabilities_init_module(); + iq_init_module(); } int diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index b330b591..369d7f7e 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -84,7 +84,6 @@ _iq_room_list_request(gchar *conferencejid) xmpp_send(conn, iq); xmpp_stanza_release(iq); } -void (*iq_room_list_request)(gchar *) = _iq_room_list_request; static void _iq_disco_info_request(gchar *jid) @@ -95,7 +94,6 @@ _iq_disco_info_request(gchar *jid) xmpp_send(conn, iq); xmpp_stanza_release(iq); } -void (*iq_disco_info_request)(gchar *) = _iq_disco_info_request; static void _iq_disco_items_request(gchar *jid) @@ -106,7 +104,6 @@ _iq_disco_items_request(gchar *jid) xmpp_send(conn, iq); xmpp_stanza_release(iq); } -void (*iq_disco_items_request)(gchar *) = _iq_disco_items_request; static void _iq_send_software_version(const char * const fulljid) @@ -117,7 +114,6 @@ _iq_send_software_version(const char * const fulljid) xmpp_send(conn, iq); xmpp_stanza_release(iq); } -void (*iq_send_software_version)(const char * const) = _iq_send_software_version; static int _iq_handle_error(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, @@ -571,3 +567,12 @@ _iq_handle_discoitems_result(xmpp_conn_t * const conn, xmpp_stanza_t * const sta return 1; } + +void +iq_init_module(void) +{ + iq_room_list_request = _iq_room_list_request; + iq_disco_info_request = _iq_disco_info_request; + iq_disco_items_request = _iq_disco_items_request; + iq_send_software_version = _iq_send_software_version; +} diff --git a/src/xmpp/xmpp.h b/src/xmpp/xmpp.h index c8c33c12..1ad5d8ff 100644 --- a/src/xmpp/xmpp.h +++ b/src/xmpp/xmpp.h @@ -77,6 +77,7 @@ typedef struct disco_identity_t { void jabber_init_module(void); void bookmark_init_module(void); void capabilities_init_module(void); +void iq_init_module(void); // connection functions void (*jabber_init)(const int disable_tls);