mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Add connection_shutdown()
This commit is contained in:
parent
3d20c85ada
commit
a67d199581
@ -90,6 +90,17 @@ connection_init(void)
|
|||||||
conn.available_resources = g_hash_table_new_full(g_str_hash, g_str_equal, free, (GDestroyNotify)resource_destroy);
|
conn.available_resources = g_hash_table_new_full(g_str_hash, g_str_equal, free, (GDestroyNotify)resource_destroy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
connection_shutdown(void)
|
||||||
|
{
|
||||||
|
connection_disco_items_free();
|
||||||
|
connection_remove_all_available_resources();
|
||||||
|
xmpp_shutdown();
|
||||||
|
|
||||||
|
free(conn.xmpp_log);
|
||||||
|
conn.xmpp_log = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
jabber_conn_status_t
|
jabber_conn_status_t
|
||||||
connection_connect(const char *const fulljid, const char *const passwd, const char *const altdomain, int port,
|
connection_connect(const char *const fulljid, const char *const passwd, const char *const altdomain, int port,
|
||||||
const char *const tls_policy)
|
const char *const tls_policy)
|
||||||
@ -400,13 +411,6 @@ connection_free_domain(void)
|
|||||||
FREE_SET_NULL(conn.domain);
|
FREE_SET_NULL(conn.domain);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
connection_free_log(void)
|
|
||||||
{
|
|
||||||
free(conn.xmpp_log);
|
|
||||||
conn.xmpp_log = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
connection_set_priority(const int priority)
|
connection_set_priority(const int priority)
|
||||||
{
|
{
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include "xmpp/xmpp.h"
|
#include "xmpp/xmpp.h"
|
||||||
|
|
||||||
void connection_init(void);
|
void connection_init(void);
|
||||||
|
void connection_shutdown(void);
|
||||||
|
|
||||||
jabber_conn_status_t connection_connect(const char *const fulljid, const char *const passwd, const char *const altdomain, int port,
|
jabber_conn_status_t connection_connect(const char *const fulljid, const char *const passwd, const char *const altdomain, int port,
|
||||||
const char *const tls_policy);
|
const char *const tls_policy);
|
||||||
@ -53,7 +54,6 @@ void connection_free_conn(void);
|
|||||||
void connection_free_ctx(void);
|
void connection_free_ctx(void);
|
||||||
void connection_free_presence_msg(void);
|
void connection_free_presence_msg(void);
|
||||||
void connection_free_domain(void);
|
void connection_free_domain(void);
|
||||||
void connection_free_log(void);
|
|
||||||
|
|
||||||
xmpp_conn_t* connection_get_conn(void);
|
xmpp_conn_t* connection_get_conn(void);
|
||||||
xmpp_ctx_t* connection_get_ctx(void);
|
xmpp_ctx_t* connection_get_ctx(void);
|
||||||
|
@ -225,12 +225,9 @@ session_shutdown(void)
|
|||||||
{
|
{
|
||||||
_session_free_saved_account();
|
_session_free_saved_account();
|
||||||
_session_free_saved_details();
|
_session_free_saved_details();
|
||||||
connection_disco_items_free();
|
|
||||||
connection_remove_all_available_resources();
|
|
||||||
chat_sessions_clear();
|
chat_sessions_clear();
|
||||||
presence_clear_sub_requests();
|
presence_clear_sub_requests();
|
||||||
xmpp_shutdown();
|
connection_shutdown();
|
||||||
connection_free_log();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user