revid: ring buffer write error results in sending of zero length data in HTTP output mode

Issue #179 resolved
Saxon Milton created an issue

If a ring buffer write fails due to the data being too long for the ring buffer element, then we add an empty element to the ring buffer and it sent in the output routine. This is due to the fact that we still perform a ring buffer flush even when the write fails. We should only perform this flush if the write is successful.