If the schema parsing fails due to an error, add the actual JSON to the
error string. This helps solve any problems that might occur due to
malformed JSON on the sending end.
See script directory for method. The script to run in the top level
MaxScale directory is called maxscale-uncrustify.sh, which uses
another script, list-src, from the same directory (so you need to set
your PATH). The uncrustify version was 0.66.
The recursive calls into `read` caused unnecessary slowness in the
connection phase. The actual first row should only be read when the data
is requested. This can possibly solve the false timeout errors caused by
slow sending of the first row of data.
The iterator to the buffer isn't really needed as the beginning of the
buffer can be used instead. This should make the code more robust. Changed
the internal buffer from a vector to a deque as the latter is more
appropriate for insertion on one end and consumption on the other.
As a JSON object can never start with the ERR prefix, it is safe to check
it for all requests. Also fixed the missing newline in the avrorouter
error message.
The function used the m_fd member variable before it was updated to point
to the actual file descriptor of the connection. This caused the test to
fail.
Also fixed the nointr_write function to correctly process multiple
consecutive writes.