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.
|
||||
|
||||
Reference in New Issue
Block a user