diff options
author | James Booth <boothj5@gmail.com> | 2014-09-06 23:23:23 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-09-06 23:23:23 +0100 |
commit | a4f6e9391c27f7f294a4615bc6cc3ff3d3b8dec5 (patch) | |
tree | 4ee93666eaee14e86fc560402c045d2e8d2d8b73 /src | |
parent | 72a364b65c8b617fe7527c2f38c24f71d5f69cd9 (diff) | |
download | profani-tty-a4f6e9391c27f7f294a4615bc6cc3ff3d3b8dec5.tar.gz |
Reassign stanza name when looking for field values
Diffstat (limited to 'src')
-rw-r--r-- | src/xmpp/form.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xmpp/form.c b/src/xmpp/form.c index f352feab..ca798c29 100644 --- a/src/xmpp/form.c +++ b/src/xmpp/form.c @@ -167,12 +167,13 @@ form_create(xmpp_stanza_t * const form_stanza) // handle repeated field children xmpp_stanza_t *field_child = xmpp_stanza_get_children(field_stanza); + child_name = xmpp_stanza_get_name(field_child); while (field_child != NULL) { // handle values if (g_strcmp0(child_name, "value") == 0) { char *value = xmpp_stanza_get_text(field_child); if (value != NULL) { - field->values = g_slist_append(field->values, value); + field->values = g_slist_append(field->values, strdup(value)); xmpp_free(ctx, value); } |