about summary refs log tree commit diff stats
path: root/src/xmpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/connection.c11
-rw-r--r--src/xmpp/session.c11
-rw-r--r--src/xmpp/xmpp.h3
3 files changed, 12 insertions, 13 deletions
diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c
index 377d5238..9f84597b 100644
--- a/src/xmpp/connection.c
+++ b/src/xmpp/connection.c
@@ -300,6 +300,17 @@ connection_conn_is_secured(void)
     }
 }
 
+gboolean
+connection_send_stanza(const char *const stanza)
+{
+    if (conn.conn_status != JABBER_CONNECTED) {
+        return FALSE;
+    } else {
+        xmpp_send_raw_string(conn.conn, "%s", stanza);
+        return TRUE;
+    }
+}
+
 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 75c5f20e..6aa27035 100644
--- a/src/xmpp/session.c
+++ b/src/xmpp/session.c
@@ -401,17 +401,6 @@ session_login_failed(void)
     }
 }
 
-gboolean
-session_send_stanza(const char *const stanza)
-{
-    if (connection_get_status() != JABBER_CONNECTED) {
-        return FALSE;
-    } else {
-        xmpp_send_raw_string(connection_get_conn(), "%s", stanza);
-        return TRUE;
-    }
-}
-
 void
 session_lost_connection(void)
 {
diff --git a/src/xmpp/xmpp.h b/src/xmpp/xmpp.h
index 391ec37d..dbea4e40 100644
--- a/src/xmpp/xmpp.h
+++ b/src/xmpp/xmpp.h
@@ -119,9 +119,7 @@ void session_shutdown(void);
 void session_process_events(int millis);
 char* session_get_account_name(void);
 GList* session_get_available_resources(void);
-gboolean session_send_stanza(const char *const stanza);
 
-gboolean session_send_stanza(const char *const stanza);
 gboolean session_service_supports(const char *const feature);
 
 jabber_conn_status_t connection_get_status(void);
@@ -133,6 +131,7 @@ void connection_free_uuid(char *uuid);
 TLSCertificate* connection_get_tls_peer_cert(void);
 #endif
 gboolean connection_conn_is_secured(void);
+gboolean connection_send_stanza(const char *const stanza);
 
 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);