about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-02-27 20:46:44 +0000
committerJames Booth <boothj5@gmail.com>2013-02-27 20:46:44 +0000
commit8d1cc96bf25bb9bc6a199c1571b0d53d4f248b8f (patch)
treeb8dc809b9a39f9611a5b4ab64b082d0ba1cb4973 /src
parentd0e0951943a14242e4f8426afc57785dee1d6846 (diff)
downloadprofani-tty-8d1cc96bf25bb9bc6a199c1571b0d53d4f248b8f.tar.gz
Made connection free resources static function
Diffstat (limited to 'src')
-rw-r--r--src/xmpp/connection.c10
-rw-r--r--src/xmpp/connection.h1
2 files changed, 6 insertions, 5 deletions
diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c
index 2c15fe44..d01e33fa 100644
--- a/src/xmpp/connection.c
+++ b/src/xmpp/connection.c
@@ -85,6 +85,8 @@ static void _connection_handler(xmpp_conn_t * const conn,
     xmpp_stream_error_t * const stream_error, void * const userdata);
 static int _ping_timed_handler(xmpp_conn_t * const conn, void * const userdata);
 
+void _connection_free_resources(void);
+
 void
 jabber_init(const int disable_tls)
 {
@@ -163,7 +165,7 @@ jabber_disconnect(void)
         while (jabber_get_connection_status() == JABBER_DISCONNECTING) {
             jabber_process_events();
         }
-        connection_free_resources();
+        _connection_free_resources();
     }
 
     jabber_conn.conn_status = JABBER_STARTED;
@@ -275,7 +277,7 @@ connection_remove_available_resource(const char * const resource)
 }
 
 void
-connection_free_resources(void)
+_connection_free_resources(void)
 {
     FREE_SET_NULL(saved_details.name);
     FREE_SET_NULL(saved_details.jid);
@@ -456,7 +458,7 @@ _connection_handler(xmpp_conn_t * const conn,
                 reconnect_timer = g_timer_new();
                 // TODO: free resources but leave saved_user untouched
             } else {
-                connection_free_resources();
+                _connection_free_resources();
             }
 
         // login attempt failed
@@ -465,7 +467,7 @@ _connection_handler(xmpp_conn_t * const conn,
             if (reconnect_timer == NULL) {
                 log_debug("Connection handler: No reconnect timer");
                 prof_handle_failed_login();
-                connection_free_resources();
+                _connection_free_resources();
             } else {
                 log_debug("Connection handler: Restarting reconnect timer");
                 if (prefs_get_reconnect() != 0) {
diff --git a/src/xmpp/connection.h b/src/xmpp/connection.h
index c242f65f..3c0c1bff 100644
--- a/src/xmpp/connection.h
+++ b/src/xmpp/connection.h
@@ -25,7 +25,6 @@
 
 #include <strophe.h>
 
-void connection_free_resources(void);
 xmpp_conn_t *connection_get_conn(void);
 xmpp_ctx_t *connection_get_ctx(void);
 int connection_error_handler(xmpp_conn_t * const conn,