conn: move _disconnect_cleanup() to other static functions
Also remove trailing spaces.
This commit is contained in:
26
src/conn.c
26
src/conn.c
@@ -697,18 +697,6 @@ void conn_parser_reset(xmpp_conn_t * const conn)
|
|||||||
parser_reset(conn->parser);
|
parser_reset(conn->parser);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* timed handler for cleanup if normal disconnect procedure takes too long */
|
|
||||||
static int _disconnect_cleanup(xmpp_conn_t * const conn,
|
|
||||||
void * const userdata)
|
|
||||||
{
|
|
||||||
xmpp_debug(conn->ctx, "xmpp",
|
|
||||||
"disconnection forced by cleanup timeout");
|
|
||||||
|
|
||||||
conn_disconnect(conn);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Initiate termination of the connection to the XMPP server.
|
/** Initiate termination of the connection to the XMPP server.
|
||||||
* This function starts the disconnection sequence by sending
|
* This function starts the disconnection sequence by sending
|
||||||
* </stream:stream> to the XMPP server. This function will do nothing
|
* </stream:stream> to the XMPP server. This function will do nothing
|
||||||
@@ -862,7 +850,7 @@ void xmpp_send(xmpp_conn_t * const conn,
|
|||||||
*/
|
*/
|
||||||
void conn_open_stream(xmpp_conn_t * const conn)
|
void conn_open_stream(xmpp_conn_t * const conn)
|
||||||
{
|
{
|
||||||
xmpp_send_raw_string(conn,
|
xmpp_send_raw_string(conn,
|
||||||
"<?xml version=\"1.0\"?>" \
|
"<?xml version=\"1.0\"?>" \
|
||||||
"<stream:stream to=\"%s\" " \
|
"<stream:stream to=\"%s\" " \
|
||||||
"xml:lang=\"%s\" " \
|
"xml:lang=\"%s\" " \
|
||||||
@@ -995,6 +983,18 @@ int xmpp_conn_is_secured(xmpp_conn_t * const conn)
|
|||||||
return conn->secured && !conn->tls_failed && conn->tls != NULL ? 1 : 0;
|
return conn->secured && !conn->tls_failed && conn->tls != NULL ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* timed handler for cleanup if normal disconnect procedure takes too long */
|
||||||
|
static int _disconnect_cleanup(xmpp_conn_t * const conn,
|
||||||
|
void * const userdata)
|
||||||
|
{
|
||||||
|
xmpp_debug(conn->ctx, "xmpp",
|
||||||
|
"disconnection forced by cleanup timeout");
|
||||||
|
|
||||||
|
conn_disconnect(conn);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static char *_conn_build_stream_tag(xmpp_conn_t * const conn,
|
static char *_conn_build_stream_tag(xmpp_conn_t * const conn,
|
||||||
char **attributes, size_t attributes_len)
|
char **attributes, size_t attributes_len)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user