From 20342cf0b6ea45bcee7417328427202196b2e5a2 Mon Sep 17 00:00:00 2001 From: Michal Simon Date: Thu, 1 Apr 2021 21:59:49 +0200 Subject: [PATCH] [XrdCl] Fix regression in partial read resp handling. --- src/XrdCl/XrdClXRootDMsgHandler.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/XrdCl/XrdClXRootDMsgHandler.cc b/src/XrdCl/XrdClXRootDMsgHandler.cc index 01184c6047f..04633ba901b 100644 --- a/src/XrdCl/XrdClXRootDMsgHandler.cc +++ b/src/XrdCl/XrdClXRootDMsgHandler.cc @@ -1035,7 +1035,7 @@ namespace XrdCl //-------------------------------------------------------------------------- // Update read state //-------------------------------------------------------------------------- - if( pAsyncOffset == pAsyncReadSize ) // the chunk is full + if( pAsyncOffset == (*pChunkList)[pAsyncChunkIndex].length ) // the chunk is full { ++pAsyncChunkIndex; // move to next buffer pReadRawStarted = false; // indicated we need a new buffer @@ -1044,6 +1044,7 @@ namespace XrdCl bytesleft -= pAsyncReadSize; // update number of bytes left to be read } + pReadRawCurrentOffset = 0; return XRootDStatus(); }