From 24f0d9e6e5b63539d09d52a52e7963dd2cfc92eb Mon Sep 17 00:00:00 2001 From: James Booth Date: Wed, 27 Feb 2013 21:21:47 +0000 Subject: [PATCH] Removed connection_shutdown function --- src/xmpp/connection.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c index 68bdcb3e..d3198db9 100644 --- a/src/xmpp/connection.c +++ b/src/xmpp/connection.c @@ -88,7 +88,6 @@ static int _ping_timed_handler(xmpp_conn_t * const conn, void * const userdata); void _connection_free_saved_account(void); void _connection_free_saved_details(void); void _connection_free_session_data(void); -void _connection_shutdown(void); void jabber_init(const int disable_tls) @@ -171,7 +170,9 @@ jabber_disconnect(void) _connection_free_saved_account(); _connection_free_saved_details(); _connection_free_session_data(); - _connection_shutdown(); + xmpp_conn_release(jabber_conn.conn); + xmpp_ctx_free(jabber_conn.ctx); + xmpp_shutdown(); } jabber_conn.conn_status = JABBER_STARTED; @@ -306,14 +307,6 @@ _connection_free_session_data(void) presence_free_sub_requests(); } -void -_connection_shutdown(void) -{ - xmpp_conn_release(jabber_conn.conn); - xmpp_ctx_free(jabber_conn.ctx); - xmpp_shutdown(); -} - int connection_error_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void * const userdata) @@ -479,7 +472,9 @@ _connection_handler(xmpp_conn_t * const conn, _connection_free_saved_account(); _connection_free_saved_details(); _connection_free_session_data(); - _connection_shutdown(); + xmpp_conn_release(jabber_conn.conn); + xmpp_ctx_free(jabber_conn.ctx); + xmpp_shutdown(); } // login attempt failed @@ -491,7 +486,9 @@ _connection_handler(xmpp_conn_t * const conn, _connection_free_saved_account(); _connection_free_saved_details(); _connection_free_session_data(); - _connection_shutdown(); + xmpp_conn_release(jabber_conn.conn); + xmpp_ctx_free(jabber_conn.ctx); + xmpp_shutdown(); } else { log_debug("Connection handler: Restarting reconnect timer"); if (prefs_get_reconnect() != 0) {