Skip to content

Commit

Permalink
Reset internal flag
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
sjaeckel committed Dec 12, 2023
1 parent c3ed0c3 commit 629cd33
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/xmpp/iq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/xmpp/xmpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 629cd33

Please sign in to comment.