about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-09-06 23:34:49 +0100
committerJames Booth <boothj5@gmail.com>2014-09-06 23:34:49 +0100
commit055ba3c4b2ab65d30b72f052a8fa6c73d2073a40 (patch)
tree73c51ec37c001fdb39102388d8d69a6ffd5f444e /src
parenta4f6e9391c27f7f294a4615bc6cc3ff3d3b8dec5 (diff)
downloadprofani-tty-055ba3c4b2ab65d30b72f052a8fa6c73d2073a40.tar.gz
Fix option handling for room config form parsing
Diffstat (limited to 'src')
-rw-r--r--src/server_events.c2
-rw-r--r--src/xmpp/form.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/server_events.c b/src/server_events.c
index c8fe2a84..a9c6c6e6 100644
--- a/src/server_events.c
+++ b/src/server_events.c
@@ -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);
diff --git a/src/xmpp/form.c b/src/xmpp/form.c
index ca798c29..43eb7503 100644
--- a/src/xmpp/form.c
+++ b/src/xmpp/form.c
@@ -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);