about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-09-04 20:17:39 +0100
committerJames Booth <boothj5@gmail.com>2014-09-04 20:17:39 +0100
commitbf283652f8b72dcc7e27a593afdeb81beef31729 (patch)
tree84f3ead222670836c4fe08b467f07816679cd71f /src
parente55b9dbeff5d4af8de9b8b38ee9f630f6a70d440 (diff)
downloadprofani-tty-bf283652f8b72dcc7e27a593afdeb81beef31729.tar.gz
Fix room config check for servers that don't send 110 status
Diffstat (limited to 'src')
-rw-r--r--src/xmpp/stanza.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/xmpp/stanza.c b/src/xmpp/stanza.c
index 09de1211..e068eeed 100644
--- a/src/xmpp/stanza.c
+++ b/src/xmpp/stanza.c
@@ -730,26 +730,17 @@ stanza_muc_requires_config(xmpp_stanza_t * const stanza)
             return FALSE;
         }
 
-        // check for status code 110 and 201
-        gboolean has110 = FALSE;
-        gboolean has201 = FALSE;
+        // check for status code 201
         xmpp_stanza_t *x_children = xmpp_stanza_get_children(x);
         while (x_children != NULL) {
             if (g_strcmp0(xmpp_stanza_get_name(x_children), STANZA_NAME_STATUS) == 0) {
                 char *code = xmpp_stanza_get_attribute(x_children, STANZA_ATTR_CODE);
-                if (g_strcmp0(code, "110") == 0) {
-                    has110 = TRUE;
-                }
                 if (g_strcmp0(code, "201") == 0) {
-                    has201 = TRUE;
+                    return TRUE;
                 }
             }
             x_children = xmpp_stanza_get_next(x_children);
         }
-
-        if (has110 && has201) {
-            return TRUE;
-        }
     }
     return FALSE;
 }