about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-02-03 22:56:23 +0000
committerJames Booth <boothj5@gmail.com>2013-02-03 22:56:23 +0000
commit9bc70e29e8c3c4ec2588df92baf4f1a10f01ff27 (patch)
treed4dc129b6d7bdfa6d1dc80b1267e78db48b86c6c
parent2ee0c4d328b0c25c1cfcfe09cb68192a37d1fac1 (diff)
downloadprofani-tty-9bc70e29e8c3c4ec2588df92baf4f1a10f01ff27.tar.gz
Removed jabber_restart function
-rw-r--r--src/profanity.c1
-rw-r--r--src/xmpp/connection.c12
-rw-r--r--src/xmpp/xmpp.h1
3 files changed, 4 insertions, 10 deletions
diff --git a/src/profanity.c b/src/profanity.c
index 30a438e1..c9f78e3d 100644
--- a/src/profanity.c
+++ b/src/profanity.c
@@ -233,7 +233,6 @@ prof_handle_disconnect(const char * const jid)
     jabber_disconnect();
     contact_list_clear();
     chat_sessions_clear();
-    jabber_restart();
     ui_disconnected();
     title_bar_set_status(PRESENCE_OFFLINE);
     status_bar_clear_message();
diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c
index 995617a1..d7ed95af 100644
--- a/src/xmpp/connection.c
+++ b/src/xmpp/connection.c
@@ -96,14 +96,6 @@ jabber_init(const int disable_tls)
     caps_init();
 }
 
-void
-jabber_restart(void)
-{
-    jabber_conn.conn_status = JABBER_STARTED;
-    jabber_conn.presence_type = PRESENCE_OFFLINE;
-    FREE_SET_NULL(jabber_conn.presence_message);
-}
-
 jabber_conn_status_t
 jabber_connect_with_account(ProfAccount *account, const char * const passwd)
 {
@@ -159,6 +151,10 @@ jabber_disconnect(void)
         }
         connection_free_resources();
     }
+    
+    jabber_conn.conn_status = JABBER_STARTED;
+    jabber_conn.presence_type = PRESENCE_OFFLINE;
+    FREE_SET_NULL(jabber_conn.presence_message);
 }
 
 void
diff --git a/src/xmpp/xmpp.h b/src/xmpp/xmpp.h
index 9ecdd5ba..10c454c6 100644
--- a/src/xmpp/xmpp.h
+++ b/src/xmpp/xmpp.h
@@ -62,7 +62,6 @@ const char * jabber_get_jid(void);
 jabber_conn_status_t jabber_get_connection_status(void);
 jabber_presence_t jabber_get_presence_type(void);
 char * jabber_get_presence_message(void);
-void jabber_restart(void);
 void jabber_set_autoping(int seconds);
 char* jabber_get_account_name(void);