mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Remove connection_free_conn(), connection_free_ctx()
This commit is contained in:
parent
a67d199581
commit
a7fa27df01
@ -194,6 +194,16 @@ connection_disconnect(void)
|
|||||||
while (conn.conn_status == JABBER_DISCONNECTING) {
|
while (conn.conn_status == JABBER_DISCONNECTING) {
|
||||||
session_process_events(10);
|
session_process_events(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (conn.xmpp_conn) {
|
||||||
|
xmpp_conn_release(conn.xmpp_conn);
|
||||||
|
conn.xmpp_conn = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (conn.xmpp_ctx) {
|
||||||
|
xmpp_ctx_free(conn.xmpp_ctx);
|
||||||
|
conn.xmpp_ctx = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LIBMESODE
|
#ifdef HAVE_LIBMESODE
|
||||||
@ -372,24 +382,6 @@ connection_get_presence_msg(void)
|
|||||||
return conn.presence_message;
|
return conn.presence_message;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
connection_free_conn(void)
|
|
||||||
{
|
|
||||||
if (conn.xmpp_conn) {
|
|
||||||
xmpp_conn_release(conn.xmpp_conn);
|
|
||||||
conn.xmpp_conn = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
connection_free_ctx(void)
|
|
||||||
{
|
|
||||||
if (conn.xmpp_ctx) {
|
|
||||||
xmpp_ctx_free(conn.xmpp_ctx);
|
|
||||||
conn.xmpp_ctx = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
connection_free_presence_msg(void)
|
connection_free_presence_msg(void)
|
||||||
{
|
{
|
||||||
|
@ -50,8 +50,6 @@ void connection_set_priority(const int priority);
|
|||||||
void connection_set_priority(int priority);
|
void connection_set_priority(int priority);
|
||||||
void connection_set_disco_items(GSList *items);
|
void connection_set_disco_items(GSList *items);
|
||||||
|
|
||||||
void connection_free_conn(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);
|
||||||
|
|
||||||
|
@ -116,8 +116,12 @@ session_connect_with_account(const ProfAccount *const account)
|
|||||||
|
|
||||||
// connect with fulljid
|
// connect with fulljid
|
||||||
Jid *jidp = jid_create_from_bare_and_resource(account->jid, account->resource);
|
Jid *jidp = jid_create_from_bare_and_resource(account->jid, account->resource);
|
||||||
jabber_conn_status_t result =
|
jabber_conn_status_t result = connection_connect(
|
||||||
connection_connect(jidp->fulljid, account->password, account->server, account->port, account->tls_policy);
|
jidp->fulljid,
|
||||||
|
account->password,
|
||||||
|
account->server,
|
||||||
|
account->port,
|
||||||
|
account->tls_policy);
|
||||||
jid_destroy(jidp);
|
jid_destroy(jidp);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -181,8 +185,6 @@ session_autoping_fail(void)
|
|||||||
plugins_on_disconnect(account_name, fulljid);
|
plugins_on_disconnect(account_name, fulljid);
|
||||||
accounts_set_last_activity(session_get_account_name());
|
accounts_set_last_activity(session_get_account_name());
|
||||||
connection_disconnect();
|
connection_disconnect();
|
||||||
connection_free_conn();
|
|
||||||
connection_free_ctx();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
connection_free_presence_msg();
|
connection_free_presence_msg();
|
||||||
@ -210,8 +212,6 @@ session_disconnect(void)
|
|||||||
connection_remove_all_available_resources();
|
connection_remove_all_available_resources();
|
||||||
chat_sessions_clear();
|
chat_sessions_clear();
|
||||||
presence_clear_sub_requests();
|
presence_clear_sub_requests();
|
||||||
connection_free_conn();
|
|
||||||
connection_free_ctx();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
connection_free_presence_msg();
|
connection_free_presence_msg();
|
||||||
|
Loading…
Reference in New Issue
Block a user