conn: clear system handlers on reconnect

xmpp_conn_t object can be reused with saving user's handlers.
However, saving system handlers can lead to a fail during connection
process. This is because old object may contain timed handlers for
missed features or other handlers that would handle incoming stanzas
incorrectly.
This commit is contained in:
Dmitry Podgorny
2017-06-24 02:10:03 +03:00
parent da8dc2d3cb
commit 5ecb0c5d0c
4 changed files with 76 additions and 0 deletions

View File

@@ -266,6 +266,7 @@ void handler_add(xmpp_conn_t * const conn,
const char * const name,
const char * const type,
void * const userdata);
void handler_system_delete_all(xmpp_conn_t *conn);
/* utility functions */
void disconnect_mem_error(xmpp_conn_t * const conn);