When multiple helper replies were read at the same time, the old code moved \0
(former EoM mark) in front of the buffer after handling the first reply, which
prevented remaining replies from being parsed.
The code also did not terminate the remaining replies correctly after moving
them to the beginning of the buffer. As far as I could test, such termination
is accidentally(?) not necessary, but I could not figure out why and added it
anyway.
helperReturnBuffer(i, srv, hlp, msg, t);
srv->roffset -= (t - srv->rbuf) + skip;
- memmove(srv->rbuf, t, srv->roffset);
+ memmove(srv->rbuf, t + skip, srv->roffset);
+ srv->rbuf[srv->roffset] = '\0';
}
if (Comm::IsConnOpen(srv->readPipe)) {