i3bar: Fully parse the JSON header

This commit is contained in:
Quentin Glidic
2012-09-03 10:43:29 +02:00
committed by Michael Stapelberg
parent 34dc6d4d64
commit 1e114d7ab5
4 changed files with 54 additions and 37 deletions

View File

@ -249,7 +249,7 @@ void stdin_io_first_line_cb(struct ev_loop *loop, ev_io *watcher, int revents) {
unsigned int consumed = 0;
/* At the moment, we dont care for the version. This might change
* in the future, but for now, we just discard it. */
child.version = determine_json_version(buffer, rec, &consumed);
parse_json_header(&child, buffer, rec, &consumed);
if (child.version > 0) {
read_json_input(buffer + consumed, rec - consumed);
} else {