+ while ((len = read(fd, outbuf, sizeof(outbuf))) > 0)
+ {
+ jsobj = json_tokener_parse_ex(tok, outbuf, len);
+
+ if (json_tokener_get_error(tok) == json_tokener_continue)
+ continue;
+
+ if (json_tokener_get_error(tok) != json_tokener_success)
+ break;
+
+ if (jsobj)
+ {
+ if (json_object_get_type(jsobj) == json_type_object)
+ blobmsg_add_object(&buf, jsobj);
+
+ json_object_put(jsobj);
+ break;
+ }
+ }
+
+ json_tokener_free(tok);
+