Skip to content

Commit

Permalink
Fix error in ReadV, manifested when all requested data is cached.
Browse files Browse the repository at this point in the history
  • Loading branch information
alja committed Apr 17, 2015
1 parent 36d1220 commit d6d912a
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/XrdFileCache/XrdFileCachePrefetch.cc
Expand Up @@ -907,17 +907,18 @@ int Prefetch::ReadV (const XrdOucIOVec *readV, int n)
}

}
XrdCl::File& clFile = ((XrdPosixFile&)m_input).clFile;
Status = clFile.VectorRead(chunkVec, (void *)0, vrInfo);
delete vrInfo;
if (!chunkVec.empty()) {
XrdCl::File& clFile = ((XrdPosixFile&)m_input).clFile;
Status = clFile.VectorRead(chunkVec, (void *)0, vrInfo);
delete vrInfo;

if (!Status.IsOK())
{
XrdPosixMap::Result(Status);
return -1;
if (!Status.IsOK())
{
XrdPosixMap::Result(Status);
return -1;
}
}
else
return nbytes;
return nbytes;
}
//______________________________________________________________________________
ssize_t
Expand Down

0 comments on commit d6d912a

Please sign in to comment.