diff options
author | James Booth <boothj5@gmail.com> | 2016-05-06 01:51:58 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2016-05-06 01:51:58 +0100 |
commit | 579d062063719ebd3a07f6ff0d90fa6de2bb8c1e (patch) | |
tree | 5dd85b46c8c9e485bae91973b147fb0caa5d5cbe /src/xmpp/connection.c | |
parent | b6c4a2029ff34a8f0824c5241508fbd550044c21 (diff) | |
download | profani-tty-579d062063719ebd3a07f6ff0d90fa6de2bb8c1e.tar.gz |
Move send stanza function
Diffstat (limited to 'src/xmpp/connection.c')
-rw-r--r-- | src/xmpp/connection.c | 11 |
1 files changed, 11 insertions, 0 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) |