From b250e3ec69800882274ca5fedb01248197efcf9d Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Thu, 16 Nov 2023 13:29:08 +0100 Subject: [PATCH] Reset internal flag Reset the `received_disco_items` flag when initializing the iq module. This has caused the console error message "Server doesn't support MAM" sometimes on reconnect. Fixes #1940 Signed-off-by: Steffen Jaeckel --- src/xmpp/iq.c | 3 ++- src/xmpp/xmpp.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index 924c98be..cd310cc3 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -259,6 +259,7 @@ iq_handlers_init(void) int millis = prefs_get_autoping() * 1000; xmpp_timed_handler_add(conn, _autoping_timed_send, millis, ctx); } + received_disco_items = FALSE; iq_rooms_cache_clear(); iq_handlers_clear(); @@ -316,7 +317,7 @@ iq_handlers_remove_win(ProfWin* window) } void -iq_handlers_clear() +iq_handlers_clear(void) { if (id_handlers) { g_hash_table_remove_all(id_handlers); diff --git a/src/xmpp/xmpp.h b/src/xmpp/xmpp.h index 23b20729..494d5fc1 100644 --- a/src/xmpp/xmpp.h +++ b/src/xmpp/xmpp.h @@ -241,7 +241,7 @@ void iq_disable_carbons(void); void iq_send_software_version(const char* const fulljid); void iq_rooms_cache_clear(void); void iq_handlers_remove_win(ProfWin* window); -void iq_handlers_clear(); +void iq_handlers_clear(void); void iq_room_list_request(gchar* conferencejid, gchar* filter); void iq_disco_info_request(gchar* jid); void iq_disco_items_request(gchar* jid);