about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-10-18 00:17:45 +0100
committerJames Booth <boothj5@gmail.com>2015-10-18 00:17:45 +0100
commit9d2745e462eabafcab51e04ec9ad225a13cf9a6f (patch)
treec27b019ad93cfee1da7a9b02152b6bcf32ae95ca /src
parent31ecd41c8fd69fbe7a62e97b0cc5e2583e3447e3 (diff)
downloadprofani-tty-9d2745e462eabafcab51e04ec9ad225a13cf9a6f.tar.gz
Removed --disable-tls command line option
Diffstat (limited to 'src')
-rw-r--r--src/main.c4
-rw-r--r--src/profanity.c10
-rw-r--r--src/profanity.h2
-rw-r--r--src/xmpp/connection.c7
-rw-r--r--src/xmpp/xmpp.h2
5 files changed, 9 insertions, 16 deletions
diff --git a/src/main.c b/src/main.c
index 49e1defc..42730049 100644
--- a/src/main.c
+++ b/src/main.c
@@ -42,7 +42,6 @@
 #include "profanity.h"
 #include "command/command.h"
 
-static gboolean disable_tls = FALSE;
 static gboolean version = FALSE;
 static char *log = "INFO";
 static char *account_name = NULL;
@@ -58,7 +57,6 @@ main(int argc, char **argv)
     static GOptionEntry entries[] =
     {
         { "version", 'v', 0, G_OPTION_ARG_NONE, &version, "Show version information", NULL },
-        { "disable-tls", 'd', 0, G_OPTION_ARG_NONE, &disable_tls, "Disable TLS", NULL },
         { "account", 'a', 0, G_OPTION_ARG_STRING, &account_name, "Auto connect to an account on startup" },
         { "log",'l', 0, G_OPTION_ARG_STRING, &log, "Set logging levels, DEBUG, INFO (default), WARN, ERROR", "LEVEL" },
         { NULL }
@@ -137,7 +135,7 @@ main(int argc, char **argv)
         return 0;
     }
 
-    prof_run(disable_tls, log, account_name);
+    prof_run(log, account_name);
 
     return 0;
 }
diff --git a/src/profanity.c b/src/profanity.c
index 4dc2af3d..8233178b 100644
--- a/src/profanity.c
+++ b/src/profanity.c
@@ -73,7 +73,7 @@
 #include "config/tlscerts.h"
 
 static void _check_autoaway(void);
-static void _init(const int disable_tls, char *log_level);
+static void _init(char *log_level);
 static void _shutdown(void);
 static void _create_directories(void);
 static void _connect_default(const char * const account);
@@ -92,9 +92,9 @@ char *saved_status;
 static gboolean cont = TRUE;
 
 void
-prof_run(const int disable_tls, char *log_level, char *account_name)
+prof_run(char *log_level, char *account_name)
 {
-    _init(disable_tls, log_level);
+    _init(log_level);
     _connect_default(account_name);
     ui_update();
 
@@ -297,7 +297,7 @@ _check_autoaway()
 }
 
 static void
-_init(const int disable_tls, char *log_level)
+_init(char *log_level)
 {
     setlocale(LC_ALL, "");
     // ignore SIGPIPE
@@ -326,7 +326,7 @@ _init(const int disable_tls, char *log_level)
     theme_init(theme);
     prefs_free_string(theme);
     ui_init();
-    jabber_init(disable_tls);
+    jabber_init();
     cmd_init();
     log_info("Initialising contact list");
     roster_init();
diff --git a/src/profanity.h b/src/profanity.h
index 269c616a..123e2f00 100644
--- a/src/profanity.h
+++ b/src/profanity.h
@@ -38,7 +38,7 @@
 #include "resource.h"
 #include "xmpp/xmpp.h"
 
-void prof_run(const int disable_tls, char *log_level, char *account_name);
+void prof_run(char *log_level, char *account_name);
 
 void prof_handle_idle(void);
 void prof_handle_activity(void);
diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c
index 5a27a63e..fa29a70e 100644
--- a/src/xmpp/connection.c
+++ b/src/xmpp/connection.c
@@ -70,7 +70,6 @@ static struct _jabber_conn_t {
     jabber_conn_status_t conn_status;
     char *presence_message;
     int priority;
-    int tls_disabled;
     char *domain;
 } jabber_conn;
 
@@ -115,14 +114,13 @@ void _connection_free_saved_details(void);
 void _connection_free_session_data(void);
 
 void
-jabber_init(const int disable_tls)
+jabber_init(void)
 {
     log_info("Initialising XMPP");
     jabber_conn.conn_status = JABBER_STARTED;
     jabber_conn.presence_message = NULL;
     jabber_conn.conn = NULL;
     jabber_conn.ctx = NULL;
-    jabber_conn.tls_disabled = disable_tls;
     jabber_conn.domain = NULL;
     presence_sub_requests_init();
     caps_init();
@@ -430,9 +428,6 @@ _jabber_connect(const char * const fulljid, const char * const passwd,
     }
     xmpp_conn_set_jid(jabber_conn.conn, fulljid);
     xmpp_conn_set_pass(jabber_conn.conn, passwd);
-    if (jabber_conn.tls_disabled) {
-        xmpp_conn_disable_tls(jabber_conn.conn);
-    }
 
 #ifdef HAVE_LIBMESODE
     char *cert_path = prefs_get_string(PREF_TLS_CERTPATH);
diff --git a/src/xmpp/xmpp.h b/src/xmpp/xmpp.h
index 839df9a7..ddf83c64 100644
--- a/src/xmpp/xmpp.h
+++ b/src/xmpp/xmpp.h
@@ -137,7 +137,7 @@ typedef struct data_form_t {
 } DataForm;
 
 // connection functions
-void jabber_init(const int disable_tls);
+void jabber_init(void);
 jabber_conn_status_t jabber_connect_with_details(const char * const jid,
     const char * const passwd, const char * const altdomain, const int port);
 jabber_conn_status_t jabber_connect_with_account(const ProfAccount * const account);