1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Fix option handling for room config form parsing

This commit is contained in:
James Booth 2014-09-06 23:34:49 +01:00
parent a4f6e9391c
commit 055ba3c4b2
2 changed files with 3 additions and 2 deletions

View File

@ -526,7 +526,7 @@ handle_room_configure(const char * const room, DataForm *form)
cons_show(" Label: %s", option->label);
}
if (option->value != NULL) {
cons_show(" Value: %s", option->value);
cons_show(" Value: %s", option->value);
}
curr_option = g_slist_next(curr_option);

View File

@ -167,8 +167,9 @@ 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) {
child_name = xmpp_stanza_get_name(field_child);
// handle values
if (g_strcmp0(child_name, "value") == 0) {
char *value = xmpp_stanza_get_text(field_child);