diff options
author | James Booth <boothj5@gmail.com> | 2016-05-06 01:49:27 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2016-05-06 01:49:27 +0100 |
commit | b6c4a2029ff34a8f0824c5241508fbd550044c21 (patch) | |
tree | f0a1aabf37bdf6b8ac11afeb640744041665a451 /src/xmpp | |
parent | 8950dbb768cc29d8ed020a1355c7733275aaf998 (diff) | |
download | profani-tty-b6c4a2029ff34a8f0824c5241508fbd550044c21.tar.gz |
Move conn is secure function
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/connection.c | 10 | ||||
-rw-r--r-- | src/xmpp/session.c | 10 | ||||
-rw-r--r-- | src/xmpp/xmpp.h | 2 |
3 files changed, 11 insertions, 11 deletions
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); |