Added stanza_add_child

This commit is contained in:
James Booth
2015-05-15 00:17:06 +01:00
parent debac69cbb
commit f57edf876a
3 changed files with 8 additions and 1 deletions

View File

@@ -61,7 +61,7 @@ end_element(void *data, const char *element)
depth--;
if (depth > 0) {
curr_stanza->parent->children = g_list_append(curr_stanza->parent->children, curr_stanza);
stanza_add_child(curr_stanza->parent, curr_stanza);
curr_stanza = curr_stanza->parent;
} else {
stanza_add(curr_stanza);

View File

@@ -52,3 +52,9 @@ stanza_add(XMPPStanza *stanza)
{
stanzas = g_list_append(stanzas, stanza);
}
void
stanza_add_child(XMPPStanza *parent, XMPPStanza *child)
{
parent->children = g_list_append(parent->children, child);
}

View File

@@ -17,5 +17,6 @@ typedef struct xmpp_stanza_t {
void stanza_show(XMPPStanza *stanza);
void stanza_show_all(void);
void stanza_add(XMPPStanza *stanza);
void stanza_add_child(XMPPStanza *parent, XMPPStanza *child);
#endif