Skip to content

Commit

Permalink
[TPC] Allow number of streams to use to be passed to the server.
Browse files Browse the repository at this point in the history
  • Loading branch information
abh3 committed Jun 11, 2018
1 parent c04dd05 commit d629071
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/XrdOuc/XrdOucTPC.cc
Expand Up @@ -45,6 +45,7 @@ const char *XrdOucTPC::tpcKey = "tpc.key";
const char *XrdOucTPC::tpcLfn = "tpc.lfn";
const char *XrdOucTPC::tpcOrg = "tpc.org";
const char *XrdOucTPC::tpcSrc = "tpc.src";
const char *XrdOucTPC::tpcStr = "tpc.str";
const char *XrdOucTPC::tpcTtl = "tpc.ttl";

/******************************************************************************/
Expand All @@ -53,7 +54,7 @@ const char *XrdOucTPC::tpcTtl = "tpc.ttl";

const char *XrdOucTPC::cgiC2Dst(const char *cKey, const char *xSrc,
const char *xLfn, const char *xCks,
char *Buff, int Blen)
char *Buff, int Blen, int strms)
{
tpcInfo Info;
char *bP = Buff;
Expand All @@ -80,6 +81,12 @@ const char *XrdOucTPC::cgiC2Dst(const char *cKey, const char *xSrc,
if (Blen > 1) n = snprintf(bP, Blen, "&%s=%s", tpcCks, xCks);
}

if (strms > 0)
{bP += n; Blen -= n;
if (Blen > 1) n = snprintf(bP, Blen, "&%s=%d", tpcStr, strms);
}


// All done
//
return (n > Blen ? "!Unable to generate full cgi." : Buff);
Expand Down
4 changes: 3 additions & 1 deletion src/XrdOuc/XrdOucTPC.hh
Expand Up @@ -38,7 +38,7 @@ public:

static
const char *cgiC2Dst(const char *cKey, const char *xSrc, const char *xLfn,
const char *xCks, char *Buff, int Blen);
const char *xCks, char *Buff, int Blen, int strms=0);

static
const char *cgiC2Src(const char *cKey, const char *xDst, int xTTL,
Expand All @@ -61,6 +61,8 @@ const char *tpcOrg;
static
const char *tpcSrc;
static
const char *tpcStr;
static
const char *tpcTtl;

XrdOucTPC() {}
Expand Down

0 comments on commit d629071

Please sign in to comment.