about summary refs log tree commit diff stats
path: root/src/xmpp/connection.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-01-25 17:18:30 +0000
committerJames Booth <boothj5@gmail.com>2014-01-25 17:18:30 +0000
commitaada6d5cd6871847a79ccc932499aaf098f4e0fe (patch)
treef0f9ca4ecd69f85d67a141f5697f4dc714054706 /src/xmpp/connection.c
parent4bd06a5d8748b0096845cecd2ad24da7a194aff0 (diff)
downloadprofani-tty-aada6d5cd6871847a79ccc932499aaf098f4e0fe.tar.gz
Don't show error for initial bookmarks request
Diffstat (limited to 'src/xmpp/connection.c')
-rw-r--r--src/xmpp/connection.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c
index 2bf5a304..075321f7 100644
--- a/src/xmpp/connection.c
+++ b/src/xmpp/connection.c
@@ -345,8 +345,17 @@ connection_error_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
     gchar *err_msg = NULL;
     gchar *from = xmpp_stanza_get_attribute(stanza, STANZA_ATTR_FROM);
     xmpp_stanza_t *error_stanza = xmpp_stanza_get_child_by_name(stanza, STANZA_NAME_ERROR);
-        xmpp_stanza_t *text_stanza =
-            xmpp_stanza_get_child_by_name(error_stanza, STANZA_NAME_TEXT);
+    xmpp_stanza_t *text_stanza = xmpp_stanza_get_child_by_name(error_stanza, STANZA_NAME_TEXT);
+
+    // handle specific errors by ID
+    char *id = xmpp_stanza_get_id(stanza);
+    if (id != NULL) {
+
+        // ignore if server doesn't support bookmarks
+        if (strcmp("bookmark_init_request", id) == 0) {
+            return 1;
+        }
+    }
 
     if (error_stanza == NULL) {
         log_debug("error message without <error/> received");