Skip to content

Commit

Permalink
[XrdCl] Fail and report error on size mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
ljanyst committed Jun 6, 2013
1 parent 5c53580 commit d8c807b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/XrdCl/XrdClClassicCopyJob.cc
Expand Up @@ -983,6 +983,17 @@ namespace XrdCl
if( progress ) progress->JobProgress( processed, size );
}

//--------------------------------------------------------------------------
// The size of the source is known and not enough data has been transfered
// to the destination
//--------------------------------------------------------------------------
if( src->GetSize() >= 0 && size != processed )
{
log->Error( UtilityMsg, "The declared source size is %ld bytes, but "
"received %ld bytes.", size, processed );
return XRootDStatus( stError, errDataError );
}

//--------------------------------------------------------------------------
// Verify the checksums if needed
//--------------------------------------------------------------------------
Expand Down

0 comments on commit d8c807b

Please sign in to comment.