about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/command/commands.c4
-rw-r--r--src/xmpp/connection.c10
-rw-r--r--src/xmpp/session.c10
-rw-r--r--src/xmpp/xmpp.h2
4 files changed, 13 insertions, 13 deletions
diff --git a/src/command/commands.c b/src/command/commands.c
index 8354465f..b7314871 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -232,7 +232,7 @@ cmd_tls_trust(ProfWin *window, const char *const command, gchar **args)
         cons_show("You are not currently connected.");
         return TRUE;
     }
-    if (!session_conn_is_secured()) {
+    if (!connection_conn_is_secured()) {
         cons_show("No TLS connection established");
         return TRUE;
     }
@@ -330,7 +330,7 @@ cmd_tls_cert(ProfWin *window, const char *const command, gchar **args)
             cons_show("You are not currently connected.");
             return TRUE;
         }
-        if (!session_conn_is_secured()) {
+        if (!connection_conn_is_secured()) {
             cons_show("No TLS connection established");
             return TRUE;
         }
diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c
index aad36103..377d5238 100644
--- a/src/xmpp/connection.c
+++ b/src/xmpp/connection.c
@@ -290,6 +290,16 @@ connection_get_tls_peer_cert(void)
 }
 #endif
 
+gboolean
+connection_conn_is_secured(void)
+{
+    if (conn.conn_status == JABBER_CONNECTED) {
+        return xmpp_conn_is_secured(conn.conn) == 0 ? FALSE : TRUE;
+    } else {
+        return FALSE;
+    }
+}
+
 static void
 _connection_handler(xmpp_conn_t *const conn, const xmpp_conn_event_t status, const int error,
     xmpp_stream_error_t *const stream_error, void *const userdata)
diff --git a/src/xmpp/session.c b/src/xmpp/session.c
index a5bc2def..75c5f20e 100644
--- a/src/xmpp/session.c
+++ b/src/xmpp/session.c
@@ -402,16 +402,6 @@ session_login_failed(void)
 }
 
 gboolean
-session_conn_is_secured(void)
-{
-    if (connection_get_status() == JABBER_CONNECTED) {
-        return xmpp_conn_is_secured(connection_get_conn()) == 0 ? FALSE : TRUE;
-    } else {
-        return FALSE;
-    }
-}
-
-gboolean
 session_send_stanza(const char *const stanza)
 {
     if (connection_get_status() != JABBER_CONNECTED) {
diff --git a/src/xmpp/xmpp.h b/src/xmpp/xmpp.h
index 4e22dbc2..391ec37d 100644
--- a/src/xmpp/xmpp.h
+++ b/src/xmpp/xmpp.h
@@ -121,7 +121,6 @@ char* session_get_account_name(void);
 GList* session_get_available_resources(void);
 gboolean session_send_stanza(const char *const stanza);
 
-gboolean session_conn_is_secured(void);
 gboolean session_send_stanza(const char *const stanza);
 gboolean session_service_supports(const char *const feature);
 
@@ -133,6 +132,7 @@ void connection_free_uuid(char *uuid);
 #ifdef HAVE_LIBMESODE
 TLSCertificate* connection_get_tls_peer_cert(void);
 #endif
+gboolean connection_conn_is_secured(void);
 
 char* message_send_chat(const char *const barejid, const char *const msg, const char *const oob_url);
 char* message_send_chat_otr(const char *const barejid, const char *const msg);
' href='#n257'>257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327