stanza: add xmpp_stanza_new_from_string()
This function creates a stanza object from a string. The string must contain a single complete stanza. Multiple stanzas will lead to memory leak and this is not handled in the patch.
This commit is contained in:
@@ -330,6 +330,7 @@ void xmpp_register_stanza_handler(conn, stanza, xmlns, type, handler)
|
||||
|
||||
/* allocate and initialize a blank stanza */
|
||||
xmpp_stanza_t *xmpp_stanza_new(xmpp_ctx_t *ctx);
|
||||
xmpp_stanza_t *xmpp_stanza_new_from_string(xmpp_ctx_t *ctx, const char *str);
|
||||
|
||||
/* clone a stanza */
|
||||
xmpp_stanza_t *xmpp_stanza_clone(xmpp_stanza_t *const stanza);
|
||||
|
||||
Reference in New Issue
Block a user