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:
Michael Vetter
2026-02-19 11:23:01 +01:00
parent b6a70aa47e
commit 12a181b5d5

View File

@@ -248,6 +248,12 @@ _iq_handler(xmpp_conn_t* const conn, xmpp_stanza_t* const stanza, void* const us
return 1;
}
static void
_xmpp_stanza_release_destroy_notify(gpointer data)
{
xmpp_stanza_release((xmpp_stanza_t*)data);
}
void
iq_handlers_init(void)
{
@@ -264,7 +270,7 @@ iq_handlers_init(void)
iq_handlers_clear();
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