]> git.sur5r.net Git - i3/i3/commitdiff
Merge branch 'master' into next
authorMichael Stapelberg <michael@stapelberg.de>
Mon, 16 Jul 2012 17:24:41 +0000 (19:24 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Mon, 16 Jul 2012 17:24:41 +0000 (19:24 +0200)
i3bar/src/child.c

index c2be484ba9210d1f71425025306c0ba4a60883c7..12782caf130490755f6363f2abb9baf83f6042b8 100644 (file)
@@ -210,9 +210,13 @@ void stdin_io_cb(struct ev_loop *loop, ev_io *watcher, int revents) {
     }
     if (!plaintext) {
         yajl_status status = yajl_parse(parser, json_input, rec);
+#if YAJL_MAJOR >= 2
         if (status != yajl_status_ok) {
-            fprintf(stderr, "[i3bar] Could not parse JSON input: %.*s\n",
-                    rec, json_input);
+#else
+        if (status != yajl_status_ok && status != yajl_status_insufficient_data) {
+#endif
+            fprintf(stderr, "[i3bar] Could not parse JSON input (code %d): %.*s\n",
+                    status, rec, json_input);
         }
         free(buffer);
     } else {