Skip to content
This repository was archived by the owner on Oct 29, 2021. It is now read-only.

Commit 7217308

Browse files
committed
conn: move _disconnect_cleanup() to other static functions
Also remove trailing spaces.
1 parent 229215b commit 7217308

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/conn.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -697,18 +697,6 @@ void conn_parser_reset(xmpp_conn_t * const conn)
697697
parser_reset(conn->parser);
698698
}
699699

700-
/* timed handler for cleanup if normal disconnect procedure takes too long */
701-
static int _disconnect_cleanup(xmpp_conn_t * const conn,
702-
void * const userdata)
703-
{
704-
xmpp_debug(conn->ctx, "xmpp",
705-
"disconnection forced by cleanup timeout");
706-
707-
conn_disconnect(conn);
708-
709-
return 0;
710-
}
711-
712700
/** Initiate termination of the connection to the XMPP server.
713701
* This function starts the disconnection sequence by sending
714702
* </stream:stream> to the XMPP server. This function will do nothing
@@ -862,7 +850,7 @@ void xmpp_send(xmpp_conn_t * const conn,
862850
*/
863851
void conn_open_stream(xmpp_conn_t * const conn)
864852
{
865-
xmpp_send_raw_string(conn,
853+
xmpp_send_raw_string(conn,
866854
"<?xml version=\"1.0\"?>" \
867855
"<stream:stream to=\"%s\" " \
868856
"xml:lang=\"%s\" " \
@@ -995,6 +983,18 @@ int xmpp_conn_is_secured(xmpp_conn_t * const conn)
995983
return conn->secured && !conn->tls_failed && conn->tls != NULL ? 1 : 0;
996984
}
997985

986+
/* timed handler for cleanup if normal disconnect procedure takes too long */
987+
static int _disconnect_cleanup(xmpp_conn_t * const conn,
988+
void * const userdata)
989+
{
990+
xmpp_debug(conn->ctx, "xmpp",
991+
"disconnection forced by cleanup timeout");
992+
993+
conn_disconnect(conn);
994+
995+
return 0;
996+
}
997+
998998
static char *_conn_build_stream_tag(xmpp_conn_t * const conn,
999999
char **attributes, size_t attributes_len)
10001000
{

0 commit comments

Comments
 (0)