cleanup: Wrap release handler in iq.c
GDestroyNotify takes a void* and returns void. Wrap xmpp_stanza_release to get rid of the incompatible function type warning.
This commit is contained in:
@@ -248,6 +248,12 @@ _iq_handler(xmpp_conn_t* const conn, xmpp_stanza_t* const stanza, void* const us
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_xmpp_stanza_release_destroy_notify(gpointer data)
|
||||||
|
{
|
||||||
|
xmpp_stanza_release((xmpp_stanza_t*)data);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
iq_handlers_init(void)
|
iq_handlers_init(void)
|
||||||
{
|
{
|
||||||
@@ -264,7 +270,7 @@ iq_handlers_init(void)
|
|||||||
iq_handlers_clear();
|
iq_handlers_clear();
|
||||||
|
|
||||||
id_handlers = g_hash_table_new_full(g_str_hash, g_str_equal, free, (GDestroyNotify)_iq_id_handler_free);
|
id_handlers = g_hash_table_new_full(g_str_hash, g_str_equal, free, (GDestroyNotify)_iq_id_handler_free);
|
||||||
rooms_cache = g_hash_table_new_full(g_str_hash, g_str_equal, free, (GDestroyNotify)xmpp_stanza_release);
|
rooms_cache = g_hash_table_new_full(g_str_hash, g_str_equal, free, _xmpp_stanza_release_destroy_notify);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct iq_win_finder
|
struct iq_win_finder
|
||||||
|
|||||||
Reference in New Issue
Block a user