free saved login information in jabber_free_resources()
This commit is contained in:
13
src/jabber.c
13
src/jabber.c
@@ -82,6 +82,13 @@ static int _presence_handler(xmpp_conn_t * const conn,
|
|||||||
xmpp_stanza_t * const stanza, void * const userdata);
|
xmpp_stanza_t * const stanza, void * const userdata);
|
||||||
static int _ping_timed_handler(xmpp_conn_t * const conn, void * const userdata);
|
static int _ping_timed_handler(xmpp_conn_t * const conn, void * const userdata);
|
||||||
|
|
||||||
|
#define FREE_SET_NULL(resource) \
|
||||||
|
{\
|
||||||
|
if (resource != NULL) \
|
||||||
|
free(resource); \
|
||||||
|
resource = NULL; \
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
jabber_init(const int disable_tls)
|
jabber_init(const int disable_tls)
|
||||||
{
|
{
|
||||||
@@ -514,8 +521,10 @@ jabber_get_status(void)
|
|||||||
void
|
void
|
||||||
jabber_free_resources(void)
|
jabber_free_resources(void)
|
||||||
{
|
{
|
||||||
saved_user = NULL;
|
FREE_SET_NULL(saved_user);
|
||||||
saved_password = NULL;
|
FREE_SET_NULL(saved_password);
|
||||||
|
FREE_SET_NULL(saved_account);
|
||||||
|
FREE_SET_NULL(saved_altdomain);
|
||||||
chat_sessions_clear();
|
chat_sessions_clear();
|
||||||
g_hash_table_remove_all(sub_requests);
|
g_hash_table_remove_all(sub_requests);
|
||||||
xmpp_conn_release(jabber_conn.conn);
|
xmpp_conn_release(jabber_conn.conn);
|
||||||
|
|||||||
Reference in New Issue
Block a user