From: Alex Rousskov Date: Tue, 1 Feb 2011 09:50:11 +0000 (-0700) Subject: Forgot to copy the read slot into caller's buffer, causing SWAPFAIL_MISSes. X-Git-Tag: take01~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=20b0e1fef123acaa1416cab241b2ff3e61005e83;p=thirdparty%2Fsquid.git Forgot to copy the read slot into caller's buffer, causing SWAPFAIL_MISSes. --- diff --git a/src/DiskIO/IpcIo/IpcIoFile.cc b/src/DiskIO/IpcIo/IpcIoFile.cc index f6e7f84500..2564a7bd47 100644 --- a/src/DiskIO/IpcIo/IpcIoFile.cc +++ b/src/DiskIO/IpcIo/IpcIoFile.cc @@ -160,12 +160,13 @@ IpcIoFile::readCompleted(ReadRequest *readRequest, if (ipcResponse.xerrno) { debugs(79,1, HERE << "error: " << xstrerr(ipcResponse.xerrno)); error_ = true; - } + } else { + memcpy(readRequest->buf, ipcResponse.buf, ipcResponse.len); + } const ssize_t rlen = error_ ? -1 : (ssize_t)readRequest->len; const int errflag = error_ ? DISK_ERROR : DISK_OK; - // XXX: check buffering expectations of the recepient - ioRequestor->readCompleted(ipcResponse.buf, rlen, errflag, readRequest); + ioRequestor->readCompleted(readRequest->buf, rlen, errflag, readRequest); } void