Skip to content

Commit

Permalink
Fix handling of sendfile offset argument
Browse files Browse the repository at this point in the history
Fixes handling of the offset used in further sendfile calls if the first one transmitted only part of the request size.
  • Loading branch information
TKollegger committed Jul 13, 2017
1 parent 830a5d5 commit 1c2a104
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Xrd/XrdLink.cc
Expand Up @@ -889,7 +889,7 @@ do{retc = sendfilev(FD, vecSFP, sfN, &xframt);
else {myOffset = sfP->offset; bytesleft = sfP->sendsz;
while(bytesleft
&& (retc=sendfile(FD,sfP->fdnum,&myOffset,bytesleft)) > 0)
{myOffset += retc; bytesleft -= retc; xIntr++;}
{bytesleft -= retc; xIntr++;}
}
if (retc < 0 && errno == EINTR) continue;
if (retc <= 0) break;
Expand Down

0 comments on commit 1c2a104

Please sign in to comment.