Skip to content

Commit

Permalink
[XrdCl] xrdcp : allow ckstype = auto.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmichal committed Apr 6, 2020
1 parent 6a45c51 commit 660fc10
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/XrdApps/XrdCpConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -613,10 +613,13 @@ int XrdCpConfig::defCks(const char *opval)

// Get a checksum object for this checksum
//
if (CksObj) {delete CksObj; CksObj = 0;}
if (!CksData.Set(csName) || !(CksObj = CksMan->Object(CksData.Name)))
UMSG("Invalid checksum type, '" <<csName <<"'.");
CksObj->Type(CksLen);
if( strcmp( csName, "auto" ) )
{
if (CksObj) {delete CksObj; CksObj = 0;}
if (!CksData.Set(csName) || !(CksObj = CksMan->Object(CksData.Name)))
UMSG("Invalid checksum type, '" <<csName <<"'.");
CksObj->Type(CksLen);
}

// Reset checksum information
//
Expand Down

0 comments on commit 660fc10

Please sign in to comment.