Remove JABBER_STARTED, JABBER_UNDEFINED connection states
This commit is contained in:
@@ -81,7 +81,7 @@ void
|
||||
connection_init(void)
|
||||
{
|
||||
xmpp_initialize();
|
||||
conn.conn_status = JABBER_STARTED;
|
||||
conn.conn_status = JABBER_DISCONNECTED;
|
||||
conn.presence_message = NULL;
|
||||
conn.xmpp_conn = NULL;
|
||||
conn.xmpp_ctx = NULL;
|
||||
@@ -174,6 +174,17 @@ connection_connect(const char *const fulljid, const char *const passwd, const ch
|
||||
return conn.conn_status;
|
||||
}
|
||||
|
||||
void
|
||||
connection_disconnect(void)
|
||||
{
|
||||
conn.conn_status = JABBER_DISCONNECTING;
|
||||
xmpp_disconnect(conn.xmpp_conn);
|
||||
|
||||
while (conn.conn_status == JABBER_DISCONNECTING) {
|
||||
session_process_events(10);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBMESODE
|
||||
TLSCertificate*
|
||||
connection_get_tls_peer_cert(void)
|
||||
|
||||
Reference in New Issue
Block a user