diff --git a/bindings/python/libs/client/copyprocess.py b/bindings/python/libs/client/copyprocess.py index 2a82fc51a62..e934dc4ac90 100644 --- a/bindings/python/libs/client/copyprocess.py +++ b/bindings/python/libs/client/copyprocess.py @@ -89,7 +89,7 @@ def add_job(self, tpctimeout = 1800, rmBadCksum = False, cptimeout = 0, - xrateThreashold = 0, + xrateThreshold = 0, xrate = 0, retry = 0, cont = False, @@ -134,8 +134,8 @@ def add_job(self, :type rmBadCksum: boolean :param cptimeout: timeout for classic cp operation :type cptimeout: integer - :param xrateThreashold: data transfer rate threshold - :type xrateThreashold: integer + :param xrateThreshold: data transfer rate threshold + :type xrateThreshold: integer :param xrate: data transfer rate limit :type xrate: integer :param retry: number of retries @@ -148,7 +148,7 @@ def add_job(self, self.__process.add_job(source, target, sourcelimit, force, posc, coerce, mkdir, thirdparty, checksummode, checksumtype, checksumpreset, dynamicsource, chunksize, parallelchunks, inittimeout, - tpctimeout, rmBadCksum, cptimeout, retry, xrateThreashold, + tpctimeout, rmBadCksum, cptimeout, retry, xrateThreshold, xrate, cont, rtrplc ) def prepare(self): diff --git a/bindings/python/src/PyXRootDCopyProcess.cc b/bindings/python/src/PyXRootDCopyProcess.cc index 6a322c92add..1ba41935ad1 100644 --- a/bindings/python/src/PyXRootDCopyProcess.cc +++ b/bindings/python/src/PyXRootDCopyProcess.cc @@ -82,7 +82,7 @@ namespace PyXRootD const char *checkSumPreset = ""; bool dynamicSource = false; bool rmBadCksum = false; - long long xRateThreashold = 0; + long long xRateThreshold = 0; long long xRate = 0; long long retry = 0; bool cont = false; @@ -114,7 +114,7 @@ namespace PyXRootD &source, &target, &sourceLimit, &force, &posc, &coerce, &mkdir, &thirdParty, &checkSumMode, &checkSumType, &checkSumPreset, &dynamicSource, &chunkSize, ¶llelChunks, &initTimeout, - &tpcTimeout, &rmBadCksum, &cpTimeout, &xRateThreashold, &xRate, + &tpcTimeout, &rmBadCksum, &cpTimeout, &xRateThreshold, &xRate, &retry, &cont, &rtrplc ) ) return NULL; @@ -138,7 +138,7 @@ namespace PyXRootD properties.Set( "tpcTimeout", tpcTimeout ); properties.Set( "rmOnBadCksum", rmBadCksum ); properties.Set( "cpTimeout", cpTimeout ); - properties.Set( "xrateThreashold", xRateThreashold ); + properties.Set( "xrateThreshold", xRateThreshold ); properties.Set( "xrate", xRate ); properties.Set( "continue", cont ); diff --git a/src/XrdApps/XrdCpConfig.cc b/src/XrdApps/XrdCpConfig.cc index bb44ad7249b..3810cff0434 100644 --- a/src/XrdApps/XrdCpConfig.cc +++ b/src/XrdApps/XrdCpConfig.cc @@ -116,7 +116,7 @@ struct option XrdCpConfig::opVec[] = // For getopt_long() {OPT_TYPE "version", 0, 0, XrdCpConfig::OpVersion}, {OPT_TYPE "xattr", 0, 0, XrdCpConfig::OpXAttr}, {OPT_TYPE "xrate", 1, 0, XrdCpConfig::OpXrate}, - {OPT_TYPE "xrate-threshold",1, 0, XrdCpConfig::OpXrateThreashold}, + {OPT_TYPE "xrate-threshold",1, 0, XrdCpConfig::OpXrateThreshold}, {OPT_TYPE "zip", 1, 0, XrdCpConfig::OpZip}, {OPT_TYPE "zip-append", 0, 0, XrdCpConfig::OpZipAppend}, {OPT_TYPE "zip-mtln-cksum", 0, 0, XrdCpConfig::OpZipMtlnCksum}, @@ -141,7 +141,7 @@ XrdCpConfig::XrdCpConfig(const char *pgm) pHost = 0; pPort = 0; xRate = 0; - xRateThreashold = 0; + xRateThreshold = 0; Parallel = 1; OpSpec = 0; Dlvl = 0; @@ -313,8 +313,8 @@ do{while(optind < Argc && Legacy(optind)) {} case OpXrate: OpSpec |= DoXrate; if (!a2z(optarg, &xRate, 10*1024LL, -1)) Usage(22); break; - case OpXrateThreashold: OpSpec |= DoXrateThreashold; - if (!a2z(optarg, &xRateThreashold, 10*1024LL, -1)) Usage(22); + case OpXrateThreshold: OpSpec |= DoXrateThreshold; + if (!a2z(optarg, &xRateThreshold, 10*1024LL, -1)) Usage(22); break; case OpParallel: OpSpec |= DoParallel; if (!a2i(optarg, &Parallel, 1, 128)) Usage(22); diff --git a/src/XrdApps/XrdCpConfig.hh b/src/XrdApps/XrdCpConfig.hh index ad319736831..04170a93773 100644 --- a/src/XrdApps/XrdCpConfig.hh +++ b/src/XrdApps/XrdCpConfig.hh @@ -66,7 +66,7 @@ struct defVar const char *srcOpq; // -> -OS setting (src opaque) const char *Pgm; // -> Program name long long xRate; // -> xrate value in bytes/sec (0 if not set) - long long xRateThreashold; // -> xrate threshold value in bytes/sec (0 if not set) + long long xRateThreshold; // -> xrate threshold value in bytes/sec (0 if not set) int Parallel; // Number of simultaneous copy ops (1 to 4) char *pHost; // -> SOCKS4 proxy hname (0 if none) int pPort; // SOCKS4 proxy port @@ -194,8 +194,8 @@ static const uint64_t DoRmOnBadCksum = 0x0000000080000000LL; // --rm-bad-cksu static const uint64_t OpContinue = 0x10; static const uint64_t DoContinue = 0x0000000100000000LL; // --continue -static const uint64_t OpXrateThreashold = 0x11; -static const uint64_t DoXrateThreashold = 0x0000000200000000LL; // --xrate-threashold +static const uint64_t OpXrateThreshold = 0x11; +static const uint64_t DoXrateThreshold = 0x0000000200000000LL; // --xrate-threshold static const uint64_t OpRetryPolicy = 0x12; static const uint64_t DoRetryPolicy = 0x0000000400000000LL; // --retry-policy diff --git a/src/XrdCl/XrdClClassicCopyJob.cc b/src/XrdCl/XrdClClassicCopyJob.cc index fd5750f3806..6e96a0cee50 100644 --- a/src/XrdCl/XrdClClassicCopyJob.cc +++ b/src/XrdCl/XrdClClassicCopyJob.cc @@ -2456,7 +2456,7 @@ namespace XrdCl pProperties->Get( "xcpBlockSize", blockSize ); pProperties->Get( "preserveXAttr", preserveXAttr ); pProperties->Get( "xrate", xRate ); - pProperties->Get( "xrateThreashold", xRateThreshold ); + pProperties->Get( "xrateThreshold", xRateThreshold ); pProperties->Get( "rmOnBadCksum", rmOnBadCksum ); pProperties->Get( "continue", continue_ ); pProperties->Get( "cpTimeout", cpTimeout ); diff --git a/src/XrdCl/XrdClCopy.cc b/src/XrdCl/XrdClCopy.cc index 4a8360eed2f..2506da5e963 100644 --- a/src/XrdCl/XrdClCopy.cc +++ b/src/XrdCl/XrdClCopy.cc @@ -877,7 +877,7 @@ int main( int argc, char **argv ) properties.Set( "targetIsDir", targetIsDir ); properties.Set( "preserveXAttr", preserveXAttr ); properties.Set( "xrate", config.xRate ); - properties.Set( "xrateThreashold", config.xRateThreashold ); + properties.Set( "xrateThreshold", config.xRateThreshold ); properties.Set( "rmOnBadCksum", rmOnBadCksum ); properties.Set( "continue", continue_ ); properties.Set( "zipAppend", zipappend ); diff --git a/src/XrdCl/XrdClCopyProcess.cc b/src/XrdCl/XrdClCopyProcess.cc index 919f8fad199..c067062b177 100644 --- a/src/XrdCl/XrdClCopyProcess.cc +++ b/src/XrdCl/XrdClCopyProcess.cc @@ -343,11 +343,11 @@ namespace XrdCl if( !p.HasProperty( "xrate" ) ) p.Set( "xrate", 0 ); - if( !p.HasProperty( "xrateThreashold" ) || p.Get( "xrateThreashold" ) == 0 ) + if( !p.HasProperty( "xrateThreshold" ) || p.Get( "xrateThreshold" ) == 0 ) { int val = DefaultXRateThreshold; env->GetInt( "XRateThreshold", val ); - p.Set( "xrateThreashold", val ); + p.Set( "xrateThreshold", val ); } //-------------------------------------------------------------------------- diff --git a/tests/XrdClTests/FileCopyTest.cc b/tests/XrdClTests/FileCopyTest.cc index 926f0d6debd..5c9c8de4d57 100644 --- a/tests/XrdClTests/FileCopyTest.cc +++ b/tests/XrdClTests/FileCopyTest.cc @@ -426,7 +426,7 @@ void FileCopyTest::CopyTestFunc( bool thirdParty ) properties.Set( "source", sourceURL ); properties.Set( "target", targetURL ); properties.Set( "xrate", 1024 * 1024 * 32 ); //< limit the transfer rate to 32MB/s - properties.Set( "xrateThreashold", 1024 * 1024 * 30 ); //< fail the job if the transfer rate drops under 30MB/s + properties.Set( "xrateThreshold", 1024 * 1024 * 30 ); //< fail the job if the transfer rate drops under 30MB/s CPPUNIT_ASSERT_XRDST( process14.AddJob( properties, &results ) ); CPPUNIT_ASSERT_XRDST( process14.Prepare() ); CPPUNIT_ASSERT_XRDST( process14.Run(0) );