Fixed indentation and typos
This commit is contained in:
10
src/conn.c
10
src/conn.c
@@ -341,7 +341,7 @@ const char *xmpp_conn_get_bound_jid(const xmpp_conn_t * const conn)
|
||||
/** Set the JID of the user that will be bound to the connection.
|
||||
* If any JID was previously set, it will be discarded. This should not be
|
||||
* be used after a connection is created. The function will make a copy of
|
||||
* the JID string. If the supllied JID is missing the node, SASL
|
||||
* the JID string. If the supplied JID is missing the node, SASL
|
||||
* ANONYMOUS authentication will be used.
|
||||
*
|
||||
* @param conn a Strophe connection object
|
||||
@@ -397,7 +397,7 @@ xmpp_ctx_t* xmpp_conn_get_context(xmpp_conn_t * const conn)
|
||||
|
||||
/** Initiate a connection to the XMPP server.
|
||||
* This function returns immediately after starting the connection
|
||||
* process to the XMPP server, and notifiations of connection state changes
|
||||
* process to the XMPP server, and notifications of connection state changes
|
||||
* will be sent to the callback function. The domain and port to connect to
|
||||
* are usually determined by an SRV lookup for the xmpp-client service at
|
||||
* the domain specified in the JID. If SRV lookup fails, altdomain and
|
||||
@@ -465,7 +465,7 @@ int xmpp_connect_client(xmpp_conn_t * const conn,
|
||||
|
||||
/** Initiate a component connection to server.
|
||||
* This function returns immediately after starting the connection
|
||||
* process to the XMPP server, and notifiations of connection state changes
|
||||
* process to the XMPP server, and notifications of connection state changes
|
||||
* will be sent to the internal callback function that will set up handler
|
||||
* for the component handshake as defined in XEP-0114.
|
||||
* The domain and port to connect to must be provided in this case as the JID
|
||||
@@ -502,7 +502,7 @@ int xmpp_connect_component(xmpp_conn_t * const conn, const char * const server,
|
||||
}
|
||||
|
||||
port = port ? port : _conn_default_port(conn, XMPP_COMPONENT);
|
||||
/* JID serves as an identificator here and will be used as "to" attribute
|
||||
/* JID serves as an identifier here and will be used as "to" attribute
|
||||
of the stream */
|
||||
return _conn_connect(conn, conn->jid, server, port, XMPP_COMPONENT,
|
||||
callback, userdata);
|
||||
@@ -645,7 +645,7 @@ void xmpp_send_raw_string(xmpp_conn_t * const conn,
|
||||
|
||||
/** Send raw bytes to the XMPP server.
|
||||
* This function is a convenience function to send raw bytes to the
|
||||
* XMPP server. It is usedly primarly by xmpp_send_raw_string. This
|
||||
* XMPP server. It is used primarily by xmpp_send_raw_string(). This
|
||||
* function should be used with care as it does not validate the bytes and
|
||||
* invalid data may result in stream termination by the XMPP server.
|
||||
*
|
||||
|
||||
10
src/stanza.c
10
src/stanza.c
@@ -28,7 +28,7 @@
|
||||
#endif
|
||||
|
||||
/** Create a stanza object.
|
||||
* This function allocates and initializes and blank stanza object.
|
||||
* This function allocates and initializes a blank stanza object.
|
||||
* The stanza will have a reference count of one, so the caller does not
|
||||
* need to clone it.
|
||||
*
|
||||
@@ -227,7 +227,7 @@ int xmpp_stanza_is_tag(xmpp_stanza_t * const stanza)
|
||||
}
|
||||
|
||||
/* Escape a string with for use in a XML text node or attribute. Assumes that
|
||||
* the input string is encoded in UTF-8. On sucess, returns a pointer to a
|
||||
* the input string is encoded in UTF-8. On success, returns a pointer to a
|
||||
* buffer with the resulting data which must be xmpp_free()'d by the caller.
|
||||
* On failure, returns NULL.
|
||||
*/
|
||||
@@ -302,7 +302,7 @@ static inline void _render_update(int *written, const int length,
|
||||
|
||||
/* always returns number of bytes written or that would have been
|
||||
* written if the buffer was large enough
|
||||
* return values < 0 indicate some error occured,
|
||||
* return values < 0 indicate some error occurred,
|
||||
* and return values > buflen indicate buffer was not large enough
|
||||
*/
|
||||
static int _render_stanza_recursive(xmpp_stanza_t *stanza,
|
||||
@@ -332,7 +332,7 @@ static int _render_stanza_recursive(xmpp_stanza_t *stanza,
|
||||
} else { /* stanza->type == XMPP_STANZA_TAG */
|
||||
if (!stanza->data) return XMPP_EINVOP;
|
||||
|
||||
/* write begining of tag and attributes */
|
||||
/* write beginning of tag and attributes */
|
||||
ret = xmpp_snprintf(ptr, left, "<%s", stanza->data);
|
||||
if (ret < 0) return XMPP_EMEM;
|
||||
_render_update(&written, buflen, ret, &left, &ptr);
|
||||
@@ -669,7 +669,7 @@ int xmpp_stanza_set_text(xmpp_stanza_t *stanza,
|
||||
}
|
||||
|
||||
/** Set the text data for a text stanza.
|
||||
* This function copies the text given and sets teh stanza object's text to
|
||||
* This function copies the text given and sets the stanza object's text to
|
||||
* it. Attempting to use this function on a stanza that has a name will
|
||||
* fail with XMPP_EINVOP. This function takes the text as buffer and a length
|
||||
* as opposed to a null-terminated string.
|
||||
|
||||
10
strophe.h
10
strophe.h
@@ -115,7 +115,7 @@ typedef struct _xmpp_log_t xmpp_log_t;
|
||||
typedef struct _xmpp_ctx_t xmpp_ctx_t;
|
||||
|
||||
xmpp_ctx_t *xmpp_ctx_new(const xmpp_mem_t * const mem,
|
||||
const xmpp_log_t * const log);
|
||||
const xmpp_log_t * const log);
|
||||
void xmpp_ctx_free(xmpp_ctx_t * const ctx);
|
||||
|
||||
struct _xmpp_mem_t {
|
||||
@@ -210,7 +210,7 @@ typedef void (*xmpp_conn_handler)(xmpp_conn_t * const conn,
|
||||
void * const userdata);
|
||||
|
||||
xmpp_conn_t *xmpp_conn_new(xmpp_ctx_t * const ctx);
|
||||
xmpp_conn_t * xmpp_conn_clone(xmpp_conn_t * const conn);
|
||||
xmpp_conn_t *xmpp_conn_clone(xmpp_conn_t * const conn);
|
||||
int xmpp_conn_release(xmpp_conn_t * const conn);
|
||||
|
||||
long xmpp_conn_get_flags(const xmpp_conn_t * const conn);
|
||||
@@ -220,7 +220,7 @@ const char *xmpp_conn_get_bound_jid(const xmpp_conn_t * const conn);
|
||||
void xmpp_conn_set_jid(xmpp_conn_t * const conn, const char * const jid);
|
||||
const char *xmpp_conn_get_pass(const xmpp_conn_t * const conn);
|
||||
void xmpp_conn_set_pass(xmpp_conn_t * const conn, const char * const pass);
|
||||
xmpp_ctx_t* xmpp_conn_get_context(xmpp_conn_t * const conn);
|
||||
xmpp_ctx_t *xmpp_conn_get_context(xmpp_conn_t * const conn);
|
||||
void xmpp_conn_disable_tls(xmpp_conn_t * const conn);
|
||||
int xmpp_conn_is_secured(xmpp_conn_t * const conn);
|
||||
void xmpp_conn_set_keepalive(xmpp_conn_t * const conn, int timeout, int interval);
|
||||
@@ -288,7 +288,7 @@ void xmpp_register_stanza_handler(conn, stanza, xmlns, type, handler)
|
||||
|
||||
/** stanzas **/
|
||||
|
||||
/** allocate an initialize a blank stanza */
|
||||
/** allocate and initialize a blank stanza */
|
||||
xmpp_stanza_t *xmpp_stanza_new(xmpp_ctx_t *ctx);
|
||||
|
||||
/** clone a stanza */
|
||||
@@ -322,7 +322,7 @@ char *xmpp_stanza_get_attribute(xmpp_stanza_t * const stanza,
|
||||
int xmpp_stanza_get_attribute_count(xmpp_stanza_t * const stanza);
|
||||
int xmpp_stanza_get_attributes(xmpp_stanza_t * const stanza,
|
||||
const char **attr, int attrlen);
|
||||
char * xmpp_stanza_get_ns(xmpp_stanza_t * const stanza);
|
||||
char *xmpp_stanza_get_ns(xmpp_stanza_t * const stanza);
|
||||
/* concatenate all child text nodes. this function
|
||||
* returns a string that must be freed by the caller */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user